Skip to content

Commit

Permalink
updating appkit ethers web guide
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-710 committed Oct 11, 2024
1 parent 33415b0 commit bc60dda
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
34 changes: 17 additions & 17 deletions docs/appkit/upgrade/to-reown-appkit-ethers-web.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
pagination_next: appkit/react/core/installation
title: Migrate from AppKit v5 to Reown AppKit Solana
title: Migrate from Web3Modal v5 to Reown AppKit Solana
displayed_sidebar: mainSidebar
---

Expand All @@ -11,24 +11,24 @@ import TabItem from '@theme/TabItem'

# Upgrade Guide

## AppKit v5 to Reown Web AppKit | Ethers
## Web3Modal v5 to Reown Web AppKit | Ethers

This guide will help you migrate from AppKit using ethers to the latest Reown AppKit.
This guide will help you migrate from Web3Modal v5 using ethers to the latest Reown AppKit.

Find here all the upgrades guides:
- [To Reown Web AppKit using wagmi](/appkit/upgrade/to-reown-appkit-web).
**Find here all the upgrades guides:**
- [To Reown Web AppKit using Wagmi](/appkit/upgrade/to-reown-appkit-web).
- [To Reown Web AppKit using Solana](/appkit/upgrade/to-reown-appkit-solana-web).
- [To Reown Web AppKit using Ethers v5](/appkit/upgrade/to-reown-appkit-ethers5-web).

### Installation

To upgrade from AppKit v5 to Reown AppKit start by removing AppKit v5 dependencies `@web3modal/ethers`.
To upgrade from Web3Modal v5 to Reown AppKit, start by removing the Web3Modal v5 dependency `@web3modal/ethers`.

```bash npm2yarn
npm uninstall @web3modal/ethers
```

Now you can install the Reown AppKit packages.
Next, install the Reown AppKit packages.
```bash npm2yarn
npm install @reown/appkit @reown/appkit-adapter-ethers
```
Expand Down Expand Up @@ -63,7 +63,7 @@ Start by importing `createAppKit` from `@reown/appkit` and the necessary chains
/* highlight-add-end */
```

Then remove the defaultConfig from Ethers.
Then, remove the `defaultConfig` function that is being imported from the Ethers package in your code.

```tsx
const projectId = 'YOUR_PROJECT_ID'
Expand All @@ -81,7 +81,7 @@ const metadata = { //optional
/* highlight-delete-end */
```

Finally, create the `EthersAdapter` and pass the other parameters to `createAppKit`
Finally, set up the `EthersAdapter` and pass the other parameters to `createAppKit` function.

```tsx
/* highlight-delete-start */
Expand Down Expand Up @@ -127,7 +127,7 @@ import { EthersAdapter } from '@reown/appkit-adapter-ethers'
/* highlight-add-end */
```

Then remove the defaultConfig from Ethers.
Then, remove the `defaultConfig` function that is being imported from the Ethers package in your code.

```tsx
const projectId = 'YOUR_PROJECT_ID'
Expand All @@ -145,7 +145,7 @@ const metadata = { //optional
/* highlight-delete-end */
```

Finally, create the `EthersAdapter` and pass other parameters to `createAppKit`
Finally, set up the `EthersAdapter` and pass the other parameters to `createAppKit` function.

```tsx
/* highlight-delete-start */
Expand Down Expand Up @@ -187,7 +187,7 @@ import { createWeb3Modal, defaultConfig } from '@web3modal/ethers'
/* highlight-add-end */
```

Then remove the defaultConfig.
Then, remove the `defaultConfig` function that is being imported from the Ethers package in your code.

```tsx
const projectId = 'YOUR_PROJECT_ID'
Expand All @@ -206,7 +206,7 @@ const metadata = { //optional
/* highlight-delete-end */
```

Finally, create the `EthersAdapter` and pass other parameters to `createAppKit`.
Finally, set up the `EthersAdapter` and pass the other parameters to `createAppKit` function.

```ts
/* highlight-delete-start */
Expand Down Expand Up @@ -262,7 +262,7 @@ Learn more about Reown AppKit [here](../react/core/installation.mdx)
</PlatformTabItem>
<PlatformTabItem value="vue">

Use your own button with to open the modal
Use your own button to open the modal

```js
document.getElementById('my-button').addEventListener('click', () => {
Expand All @@ -277,7 +277,7 @@ Learn more about Reown AppKit JavaScript [here](../javascript/core/installation.
</PlatformTabItem>
<PlatformTabItem value="javascript">

Use your own button with to open the modal
Use your own button to open the modal

```js
document.getElementById('my-button').addEventListener('click', () => {
Expand Down Expand Up @@ -351,11 +351,11 @@ Unlike in v5, `modal.switchNetwork` takes the chain object as parameter rather t

```tsx
/* highlight-delete-start */
switchNetwork(137)
modal.switchNetwork(137)
/* highlight-delete-end */
/* highlight-add-start */
import { polygon } from '@reown/appkit/networks'
switchNetwork(polygon)
modal.switchNetwork(polygon)
/* highlight-add-end */
```

Expand Down
2 changes: 1 addition & 1 deletion docs/appkit/upgrade/to-reown-appkit-ethers5-web.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To upgrade from Web3Modal v5 to Reown AppKit, start by removing the Web3Modal v5
npm uninstall @web3modal/ethers5
```

Next, install the Reown AppKit and Solana wallet adapter packages.
Next, install the Reown AppKit packages.
```bash npm2yarn
npm install @reown/appkit @reown/appkit-adapter-ethers5
```
Expand Down

0 comments on commit bc60dda

Please sign in to comment.