Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Karkunow committed Sep 25, 2024
1 parent 742443a commit de2986f
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions docs/dev-reference/eth-wallets.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,16 +158,13 @@ To do that you will need to:

You can read more about the `projectId` and how it works [here](https://docs.reown.com/appkit/react/core/installation#cloud-configuration).

### Create `wagmiConfig`
### Prepare metadata

Now, we can use that `projectId` to instantiate the `wagmiConfig`:
Make sure to pass the correct hosting URL here of your project as `url` and create a `metadata` object:

```js title="source/wallets/web3modal.js"

...

const reownProjectId = '5bb0fe33763b3bea40b8d69e4269b4ae';

// get your host URL here
const url = "http://localhost:3000";

Expand All @@ -178,6 +175,21 @@ const metadata = {
icons: [`${url}/icon.svg`],
};

...
```

### Create `wagmiConfig`

Now, we can use that `projectId` and `metadata` to instantiate the `wagmiConfig`:

```js title="source/wallets/web3modal.js"

...

const reownProjectId = '5bb0fe33763b3bea40b8d69e4269b4ae';

const metadata = { ... };

export const wagmiConfig = createConfig({
chains: [nearChain],
transports: {
Expand All @@ -195,6 +207,10 @@ reconnect(wagmiConfig);

```

:::note
Make sure you have `reconnect(wagmiConfig);` in your code.
:::

### Create Web3Modal

Let's create a Web3Modal now with a config we just prepared with `createWeb3Modal` function:
Expand Down

0 comments on commit de2986f

Please sign in to comment.