Skip to content

Commit c9e095c

Browse files
authored
Merge pull request #1320 from blocknative/update-migration-guide-for-w3o
Update [...2]onboard.js-migration-guide.md
2 parents f069af5 + 5ff542b commit c9e095c

File tree

2 files changed

+14
-39
lines changed

2 files changed

+14
-39
lines changed

docs/src/routes/docs/[...1]overview/[...3]onboard.js-migration-guide.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ With Web3-Onboard, we’ve introduced significant architectural changes that pro
1313

1414
If you have bnc-onboard installed, you will need to install web3-onboard instead. The basic steps you need to take to get started are:
1515

16-
1. Install `npm i @web3-onboard/core`. You can then go ahead and install other specific wallet modules you want.
16+
1. Install `npm i @web3-onboard/core`. You can then go ahead and install other specific wallet modules you want (most likely `npm i @web3-onboard/injected-wallets` for browser wallet support).
1717
2. Initialize Onboard with the wallets you’ve installed along with the networks you would like to support.
1818
3. Make use of our API actions like `await onboard.connectWallet()` to allow a user to connect their wallets.
1919

2020
For a full code overview of the upgrade process using the React Hooks package please see [this PR](https://github.com/blocknative/react-demo/pull/160/files) with special attention to the `App.js` and `services.js` files.
21-
To help you get started quickly on any framework you're using, we’ve put together [a quickstart that includes the above-mentioned steps](https://docs.blocknative.com/onboard#quickstart).
21+
To help you get started quickly we’ve put together [a set of examples across multiple frameworks that includes the above-mentioned steps](https://github.com/blocknative/web3-onboard/tree/v2-web3-onboard-develop/examples).
2222

2323
### Package Upgrade - Modularization
2424

2525
This is the biggest change you might experience as an onboard.js user. With Web3-Onboard, we’ve separated all supported wallets into their modules, meaning you only need to integrate specific wallet modules you intend to support in your app.
26-
For example with Onboard, if you wanted to support only Metamask and Coinbase in your app, you had to install Onboard complete with all other wallets: npm install bnc-onboard
26+
For example with Onboard, if you wanted to support only Metamask and Coinbase in your app, you had to install Onboard complete with all other wallets: `npm install bnc-onboard`.
2727
With Web3-Onboard, you only need to install core along with the desired wallet modules: `npm i @web3-onboard/core @web3-onboard/injected-wallets @web3-onboard/coinbase`
2828
This change allows us to support many web3 wallets without affecting the overall library performance.
2929

3030
### Expansive Initialization Options
3131

32-
We’ve made initialization simpler while introducing more powerful options like [Account Center](https://www.blocknative.com/blog/multichain-and-multiwallet-account-management-on-your-dapp-with-account-center) and Notify in web3-onboard.
32+
We’ve made initialization simpler while introducing more powerful options like [Account Center](https://www.blocknative.com/blog/multichain-and-multiwallet-account-management-on-your-dapp-with-account-center) and Notify in Web3-Onboard.
3333
Onboard now requires two compulsory initial setup options: `wallets` (Wallet modules, as shown above, to be initialized and added to wallet selection modal) and `chains` (EVM networks your app should work with). You can also pass multiple wallets and chains.
3434

3535
```
@@ -46,7 +46,7 @@ const onboard = Onboard({
4646
})
4747
```
4848

49-
You can find the full list of initialization options in our docs here.
49+
You can find the full list of initialization options in our docs [here](/docs/packages/core#options).
5050

5151
### API Upgrades
5252

@@ -55,15 +55,15 @@ Now, you only need to call the connectWallet API:
5555

5656
`await onboard.connectWallet()`
5757

58-
Learn more about state changes tracked with the Onboard API here and the exposed actions you can use to modify the state here.
58+
Learn more about state changes tracked with the Onboard API [here](/docs/packages/core#state) and the exposed actions you can use to modify the state [here](/docs/packages/core#actions-to-modify-state).
5959

6060
### Framework Support
6161

6262
Although Onboard is still framework-agnostic, we’ve introduced a couple of framework-specific modules that are frequently asked for by our users.
6363

64-
`@web3-onboard/react` - React Hooks to connect users to web3 dApps better. You can check out [a comprehensive React Hooks guide](https://www.blocknative.com/blog/react-hooks-ethereum) we've written on that.
64+
`@web3-onboard/react` - React Hooks to connect users to web3 dApps better. You can check out [a comprehensive React Hooks guide](https://www.blocknative.com/blog/react-hooks-ethereum) we've written on it.
6565

66-
`@web3-onboard/vue` - A set of reusable functions for integrating Web3-Onboard into a Vue 3 project. This is also compatible with a Vue 2 + composition-api dapp.
66+
`@web3-onboard/vue` - A set of reusable functions for integrating Web3-Onboard into a Vue 3 project. This is also compatible with a Vue 2 + composition-api dApp.
6767

6868
### CSS Customizations
6969

@@ -89,7 +89,7 @@ We've also added more expansive custom CSS properties so you can style every par
8989
}
9090
```
9191

92-
The full list of CSS variables for web3-onboard are available here.
92+
The full list of CSS variables for web3-onboard are available [here](/docs/packages/core#custom-styling).
9393

9494
### Other Important Changes
9595

@@ -98,4 +98,7 @@ There are also other notable infrastructural changes in Web3-Onboard:
9898
- Dynamic Imports of dependencies
9999
- Wallet Provider Standardization
100100
- Support for Chain ID in decimal format
101-
- If you have questions or requests, please feel free to drop by the [community-support discord channel](https://discord.com/channels/542403978693050389/542406894677917699) or [create a PR or issue on GitHub](https://github.com/blocknative/web3-onboard/issues/new/choose).
101+
102+
### Questions and Requests
103+
104+
If you have questions or requests, please feel free to drop by the [community-support discord channel](https://discord.com/channels/542403978693050389/542406894677917699) or [create a PR or issue on GitHub](https://github.com/blocknative/web3-onboard/issues/new/choose).

yarn.lock

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2953,34 +2953,6 @@
29532953
dependencies:
29542954
"@walletconnect/window-getters" "^1.0.0"
29552955

2956-
"@web3-onboard/common@^2.2.2":
2957-
version "2.2.2"
2958-
resolved "https://registry.yarnpkg.com/@web3-onboard/common/-/common-2.2.2.tgz#abef8ca861835ab00e5b4641462de2c3db73fc89"
2959-
integrity sha512-04Y2Fryiu48nW27dgAtYmPugdhYbeIZq4HM1wsqRftQjgyEWnsam3YyeKRWBABa5iTsE2a/Fo4LofuBG5RMVYw==
2960-
dependencies:
2961-
bignumber.js "^9.1.0"
2962-
ethers "5.5.4"
2963-
joi "^17.4.2"
2964-
2965-
"@web3-onboard/core@^2.6.0-alpha.1":
2966-
version "2.8.3"
2967-
resolved "https://registry.yarnpkg.com/@web3-onboard/core/-/core-2.8.3.tgz#e41c3e11b5a38d7b5e2ee15d4dc2cf49307d38c5"
2968-
integrity sha512-3CKc33dKqC9jurbf0+7mfvddBJgvCU4n9ADu68XlmCws3xP8Gq1nji4Y/AEUqcfhfdPWno6vIgc/j1cYseCIhw==
2969-
dependencies:
2970-
"@web3-onboard/common" "^2.2.2"
2971-
bignumber.js "^9.0.0"
2972-
bnc-sdk "^4.4.1"
2973-
bowser "^2.11.0"
2974-
ethers "5.5.3"
2975-
eventemitter3 "^4.0.7"
2976-
joi "17.6.0"
2977-
lodash.merge "^4.6.2"
2978-
lodash.partition "^4.6.0"
2979-
nanoid "^4.0.0"
2980-
rxjs "^7.5.2"
2981-
svelte "^3.49.0"
2982-
svelte-i18n "^3.3.13"
2983-
29842956
"@web3auth/base-plugin@^1.0.1":
29852957
version "1.0.1"
29862958
resolved "https://registry.yarnpkg.com/@web3auth/base-plugin/-/base-plugin-1.0.1.tgz#1e2a87acf745299fdff6f92e6c46ee9bc38aa670"
@@ -10101,7 +10073,7 @@ svelte-preprocess@^4.0.0, svelte-preprocess@^4.9.4:
1010110073
sorcery "^0.10.0"
1010210074
strip-indent "^3.0.0"
1010310075

10104-
svelte@^3.42.5, svelte@^3.49.0:
10076+
svelte@^3.42.5:
1010510077
version "3.49.0"
1010610078
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029"
1010710079
integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA==

0 commit comments

Comments
 (0)