Skip to content

Commit

Permalink
chore: update ui-kit versions in ui tutorial (#1109)
Browse files Browse the repository at this point in the history
  • Loading branch information
samsiegart authored May 30, 2024
1 parent 4803f6d commit 358d42e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
25 changes: 14 additions & 11 deletions main/guides/getting-started/ui-tutorial/agoric-provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This makes it easy to handle all the platform-specific implementation details, s
Install the following dependencies:

```
yarn add -D @agoric/react-components@0.1.1-dev-1329752.0 cosmos-kit@2.8.5 @interchain-ui/react@1.22.11
yarn add -D @agoric/react-components@0.2.0 cosmos-kit@2.8.5 @interchain-ui/react@1.22.11
```

The `cosmos-kit` dependency is used to provide different wallets in the wallet connection modal.
Expand Down Expand Up @@ -48,16 +48,19 @@ function App() {
<div className={themeClass}>
<AgoricProvider
wallets={wallets.extension}
defaultNetworkConfig={{
testChain: {
chainId: 'agoriclocal',
chainName: 'agoric-local',
agoricNetworkConfigs={[
{
testChain: {
chainId: 'agoriclocal',
chainName: 'agoric-local',
},
apis: {
rest: ['http://localhost:1317'],
rpc: ['http://localhost:26657'],
},
},
apis: {
rest: ['http://localhost:1317'],
rpc: ['http://localhost:26657'],
},
}}
]}
defaultChainName="agoric-local"
>
<h1>Agoric UI Tutorial</h1>
<ConnectWalletButton />
Expand All @@ -70,7 +73,7 @@ function App() {
export default App;
```

You may have noticed the `defaultNetworkConfig` prop points to a local chain. This assumes
You may have noticed the `defaultChainName` prop points to a local chain. This assumes
that you are still running the local chain from [Getting Started](../../getting-started/index.md) in Docker. If you're not, make sure to follow those steps before proceeding.

Note: If you see a type error on the `wallets` prop, this is likely because `@agoric/react-components` is using an older version of `cosmos-kit` than what was installed in your app. To fix this, you can add `resolutions` to your `package.json` like so:
Expand Down
2 changes: 1 addition & 1 deletion main/guides/getting-started/ui-tutorial/connect-wallet.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Next, we'll add a dependency on `@agoric/web-components`, which provides a utili
amounts and handling various denoms:

```
yarn add -D @agoric/web-components@0.15.1-dev-1329752.0
yarn add -D @agoric/web-components@0.16.0
```

Then, in `Purses.tsx`, we can put it all together to render the IST balance:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ After rebuilding the app, you should see the component rendering with the placeh
add the `chainStorageWatcher` and look up the contract on-chain. First add `@agoric/rpc` as a dependency:

```
yarn add -D @agoric/rpc@0.9.1-dev-1329752.0
yarn add -D @agoric/rpc@0.10.0
```

Next, let's go to our `src/hooks.ts` file and create another hook for reading the chain data:
Expand Down

0 comments on commit 358d42e

Please sign in to comment.