From bc60dda9c7bc0c96d31dd19195119724c2975a70 Mon Sep 17 00:00:00 2001 From: Rohit Ramesh Date: Fri, 11 Oct 2024 12:16:07 +0530 Subject: [PATCH] updating appkit ethers web guide --- .../upgrade/to-reown-appkit-ethers-web.mdx | 34 +++++++++---------- .../upgrade/to-reown-appkit-ethers5-web.mdx | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/appkit/upgrade/to-reown-appkit-ethers-web.mdx b/docs/appkit/upgrade/to-reown-appkit-ethers-web.mdx index 25846986..e316e797 100644 --- a/docs/appkit/upgrade/to-reown-appkit-ethers-web.mdx +++ b/docs/appkit/upgrade/to-reown-appkit-ethers-web.mdx @@ -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 --- @@ -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 ``` @@ -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' @@ -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 */ @@ -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' @@ -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 */ @@ -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' @@ -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 */ @@ -262,7 +262,7 @@ Learn more about Reown AppKit [here](../react/core/installation.mdx) -Use your own button with to open the modal +Use your own button to open the modal ```js document.getElementById('my-button').addEventListener('click', () => { @@ -277,7 +277,7 @@ Learn more about Reown AppKit JavaScript [here](../javascript/core/installation. -Use your own button with to open the modal +Use your own button to open the modal ```js document.getElementById('my-button').addEventListener('click', () => { @@ -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 */ ``` diff --git a/docs/appkit/upgrade/to-reown-appkit-ethers5-web.mdx b/docs/appkit/upgrade/to-reown-appkit-ethers5-web.mdx index b137afa0..15ef0ca5 100644 --- a/docs/appkit/upgrade/to-reown-appkit-ethers5-web.mdx +++ b/docs/appkit/upgrade/to-reown-appkit-ethers5-web.mdx @@ -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 ```