Skip to content

Commit 50833aa

Browse files
authored
Merge pull request #1254 from blocknative/release/2.10.0
Release 2.10.0 (main)
2 parents d97dae8 + f274dc6 commit 50833aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+714
-397
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: PR Status Checks
2+
3+
on:
4+
# Allows it to be manually triggered, used primarily for debugging
5+
workflow_dispatch:
6+
pull_request:
7+
branches:
8+
- v2-web3-onboard-develop
9+
10+
jobs:
11+
checks:
12+
name: "Checks"
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Setup Nodejs and yarn
20+
uses: actions/setup-node@v2
21+
with:
22+
node-version: "16"
23+
cache: yarn
24+
25+
- name: Install dependencies
26+
run: yarn
27+
28+
- name: Check that it builds
29+
run: yarn build
30+
31+
- name: Check formatting and types
32+
run: yarn check

examples/with-ledger/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"dependencies": {
1212
"@web3-onboard/ledger": "^2.1.6",
1313
"@web3-onboard/react": "^2.2.4",
14-
"next": "12.2.3",
14+
"next": "12.2.4",
1515
"react": "18.2.0",
1616
"react-dom": "18.2.0"
1717
},

examples/with-ledger/yarn.lock

Lines changed: 86 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -888,10 +888,10 @@
888888
tweetnacl "^1.0.3"
889889
tweetnacl-util "^0.15.1"
890890

891-
"@next/env@12.2.3":
892-
version "12.2.3"
893-
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.2.3.tgz#64f210e74c137d3d9feea738795b055a7f8aebe2"
894-
integrity sha512-2lWKP5Xcvnor70NaaROZXBvU8z9mFReePCG8NhZw6NyNGnPvC+8s+Cre/63LAB1LKzWw/e9bZJnQUg0gYFRb2Q==
891+
"@next/env@12.2.4":
892+
version "12.2.4"
893+
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.2.4.tgz#5ba9bed9970be4113773233148b4539691bfc4fe"
894+
integrity sha512-/gApFXWk5CCLFQJL5IYJXxPQuG5tz5nPX4l27A9Zm/+wJxiwFrRSP54AopDxIv4JRp/rGwcgk/lZS/0Clw8jYA==
895895

896896
"@next/eslint-plugin-next@12.2.3":
897897
version "12.2.3"
@@ -900,70 +900,70 @@
900900
dependencies:
901901
glob "7.1.7"
902902

903-
"@next/swc-android-arm-eabi@12.2.3":
904-
version "12.2.3"
905-
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.3.tgz#91388c8ec117d59ee80d2c1d4dc65fdfd267d2d4"
906-
integrity sha512-JxmCW9XB5PYnkGE67BdnBTdqW0SW6oMCiPMHLdjeRi4T3U4JJKJGnjQld99+6TPOfPWigtw3W7Cijp5gc+vJ/w==
907-
908-
"@next/swc-android-arm64@12.2.3":
909-
version "12.2.3"
910-
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.2.3.tgz#9be33553861f6494616b910a23abd5a1b0d7fb4b"
911-
integrity sha512-3l4zXpWnzy0fqoedsFRxzMy/eGlMMqn6IwPEuBmtEQ4h7srmQFHyT+Bk+eVHb0o1RQ7/TloAa+mu8JX5tz/5tA==
912-
913-
"@next/swc-darwin-arm64@12.2.3":
914-
version "12.2.3"
915-
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.2.3.tgz#ce1a5a7320936b2644b765ace3283e5d1676b6a0"
916-
integrity sha512-eutDO/RH6pf7+8zHo3i2GKLhF0qaMtxWpY8k3Oa1k+CyrcJ0IxwkfH/x3f75jTMeCrThn6Uu8j3WeZOxvhto1Q==
917-
918-
"@next/swc-darwin-x64@12.2.3":
919-
version "12.2.3"
920-
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.2.3.tgz#f70ce07016501c6f823035bc67296b8f80201145"
921-
integrity sha512-lve+lnTiddXbcT3Lh2ujOFywQSEycTYQhuf6j6JrPu9oLQGS01kjIqqSj3/KMmSoppEnXo3BxkgYu+g2+ecHkA==
922-
923-
"@next/swc-freebsd-x64@12.2.3":
924-
version "12.2.3"
925-
resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.3.tgz#ccc6fa4588dadec85458091aa19c17bc3e99a10d"
926-
integrity sha512-V4bZU1qBFkULTPW53phY8ypioh3EERzHu9YKAasm9RxU4dj+8c/4s60y+kbFkFEEpIUgEU6yNuYZRR4lHHbUGA==
927-
928-
"@next/swc-linux-arm-gnueabihf@12.2.3":
929-
version "12.2.3"
930-
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.2.3.tgz#d7a481d3ede14dee85707d0807b4a05cd2300950"
931-
integrity sha512-MWxS/i+XSEKdQE0ZmdYkPPrWKBi4JwMVaXdOW9J/T/sZJsHsLlSC9ErBcNolKAJEVka+tnw9oPRyRCKOj+q0sw==
932-
933-
"@next/swc-linux-arm64-gnu@12.2.3":
934-
version "12.2.3"
935-
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.2.3.tgz#6d105c971cc0957c25563aa98af475291b4cd8aa"
936-
integrity sha512-ikXkqAmvEcWTzIQFDdmrUHLWzdDAF5s2pVsSpQn9rk/gK1i9webH1GRQd2bSM7JLuPBZSaYrNGvDTyHZdSEYlg==
937-
938-
"@next/swc-linux-arm64-musl@12.2.3":
939-
version "12.2.3"
940-
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.2.3.tgz#bebfe490130e3cb8746a03d35a5a9e23ac0e6f9b"
941-
integrity sha512-wE45gGFkeLLLnCoveKaBrdpYkkypl3qwNF2YhnfvfVK7etuu1O679LwClhCWinDVBr+KOkmyHok00Z+0uI1ycg==
942-
943-
"@next/swc-linux-x64-gnu@12.2.3":
944-
version "12.2.3"
945-
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.3.tgz#84a3d99f9d656fbc139f3a19f9b1baf73877d18f"
946-
integrity sha512-MbFI6413VSXiREzHwYD8YAJLTknBaC+bmjXgdHEEdloeOuBFQGE3NWn3izOCTy8kV+s98VDQO8au7EKKs+bW0g==
947-
948-
"@next/swc-linux-x64-musl@12.2.3":
949-
version "12.2.3"
950-
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.3.tgz#a283431f8c6c830b4bd61147094f150ea7deeb6e"
951-
integrity sha512-jMBD0Va6fInbPih/dNySlNY2RpjkK6MXS+UGVEvuTswl1MZr+iahvurmshwGKpjaRwVU4DSFMD8+gfWxsTFs1Q==
952-
953-
"@next/swc-win32-arm64-msvc@12.2.3":
954-
version "12.2.3"
955-
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.2.3.tgz#bab9ba8736d81db128badb70024268469eaa9b34"
956-
integrity sha512-Cq8ToPdc0jQP2C7pjChYctAsEe7+lO/B826ZCK5xFzobuHPiCyJ2Mzx/nEQwCY4SpYkeJQtCbwlCz5iyGW5zGg==
957-
958-
"@next/swc-win32-ia32-msvc@12.2.3":
959-
version "12.2.3"
960-
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.2.3.tgz#feea6ada1ba3e897f39ded9f2de5006f4e1c928b"
961-
integrity sha512-BtFq4c8IpeB0sDhJMHJFgm86rPkOvmYI8k3De8Y2kgNVWSeLQ0Q929PWf7e+GqcX1015ei/gEB41ZH8Iw49NzA==
962-
963-
"@next/swc-win32-x64-msvc@12.2.3":
964-
version "12.2.3"
965-
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.3.tgz#403e1575a84c31cbd7f3c0ecd51b61bc25b7f808"
966-
integrity sha512-huSNb98KSG77Kl96CoPgCwom28aamuUsPpRmn/4s9L0RNbbHVSkp9E6HA4yOAykZCEuWcdNsRLbVVuAbt8rtIw==
903+
"@next/swc-android-arm-eabi@12.2.4":
904+
version "12.2.4"
905+
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.2.4.tgz#5c7f508f93baec810c96bf60128b7c1f2109bee2"
906+
integrity sha512-P4YSFNpmXXSnn3P1qsOAqz+MX3On9fHrlc8ovb/CFJJoU+YLCR53iCEwfw39e0IZEgDA7ttgr108plF8mxaX0g==
907+
908+
"@next/swc-android-arm64@12.2.4":
909+
version "12.2.4"
910+
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.2.4.tgz#f86411e0513419f027d16b2d4d823a3ca631a634"
911+
integrity sha512-4o2n14E18O+8xHlf6dgJsWPXN9gmSmfIe2Z0EqKDIPBBkFt/2CyrH0+vwHnL2l7xkDHhOGfZYcYIWVUR5aNu0A==
912+
913+
"@next/swc-darwin-arm64@12.2.4":
914+
version "12.2.4"
915+
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.2.4.tgz#23db172f02f5cf0ceca5e0934cfde21f30cc7461"
916+
integrity sha512-DcUO6MGBL9E3jj5o86MUnTOy4WawIJJhyCcFYO4f51sbl7+uPIYIx40eo98A6NwJEXazCqq1hLeqOaNTAIvDiQ==
917+
918+
"@next/swc-darwin-x64@12.2.4":
919+
version "12.2.4"
920+
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.2.4.tgz#820125d2a4d35cd9c807156a403a447360b5923f"
921+
integrity sha512-IUlFMqeLjdIzDorrGC2Dt+2Ae3DbKQbRzCzmDq4/CP1+jJGeDXo/2AHnlE+WYnwQAC4KtAz6pbVnd3KstZWsVA==
922+
923+
"@next/swc-freebsd-x64@12.2.4":
924+
version "12.2.4"
925+
resolved "https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-12.2.4.tgz#81ccd262c7ea3f7ed2de136c3402fc28cd103ce8"
926+
integrity sha512-475vwyWcjnyDVDWLgAATP0HI8W1rwByc+uXk1B6KkAVFhkoDgH387LW0uNqxavK+VxCzj3avQXX/58XDvxtSlg==
927+
928+
"@next/swc-linux-arm-gnueabihf@12.2.4":
929+
version "12.2.4"
930+
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.2.4.tgz#5b543e461696adcb60c64b56fc81eaa9e3cfcdd8"
931+
integrity sha512-qZW+L3iG3XSGtlOPmD5RRWXyk6ZNdscLV0BQjuDvP+exTg+uixqHXOHz0/GVATIJEBQOF0Kew7jAXVXEP+iRTQ==
932+
933+
"@next/swc-linux-arm64-gnu@12.2.4":
934+
version "12.2.4"
935+
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.2.4.tgz#f83b824d112494db41df69e2c456950a57deacba"
936+
integrity sha512-fEPRjItWYaKyyG9N+2HIA59OBHIhk7WC+Rh+LwXsh0pQe870Ykpek3KQs0umjsrEGe57NyMomq3f80/N8taDvA==
937+
938+
"@next/swc-linux-arm64-musl@12.2.4":
939+
version "12.2.4"
940+
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.2.4.tgz#a7e575970fcd6166c7b506fd25121927c13349ee"
941+
integrity sha512-rnCTzXII0EBCcFn9P5s/Dho2kPUMSX/bP0iOAj8wEI/IxUEfEElbin89zJoNW30cycHu19xY8YP4K2+hzciPzQ==
942+
943+
"@next/swc-linux-x64-gnu@12.2.4":
944+
version "12.2.4"
945+
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.2.4.tgz#4dd2ad1c72c160430199265e74b6d7037f2be4f5"
946+
integrity sha512-PhXX6NSuIuhHInxPY2VkG2Bl7VllsD3Cjx+pQcS1wTym7Zt7UoLvn05PkRrkiyIkvR+UXnqPUM3TYiSbnemXEw==
947+
948+
"@next/swc-linux-x64-musl@12.2.4":
949+
version "12.2.4"
950+
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.2.4.tgz#15415b1e6b92ca19453c4c6113496685167b05d4"
951+
integrity sha512-GmC/QROiUZpFirHRfPQqMyCXZ+5+ndbBZrMvL74HtQB/CKXB8K1VM+rvy9Gp/5OaU8Rxp48IcX79NOfI2LiXlA==
952+
953+
"@next/swc-win32-arm64-msvc@12.2.4":
954+
version "12.2.4"
955+
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.2.4.tgz#48344aded1702e321bef0fdefc3fb9f763c2ba25"
956+
integrity sha512-9XKoCXbNZuaMRPtcKQz3+hgVpkMosaLlcxHFXT8/j4w61k7/qvEbrkMDS9WHNrD/xVcLycwhPRgXcns2K1BdBQ==
957+
958+
"@next/swc-win32-ia32-msvc@12.2.4":
959+
version "12.2.4"
960+
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.2.4.tgz#e040fbf292205716c2c1d69d51c1c98fa59825ff"
961+
integrity sha512-hEyRieZKH9iw4AzvXaQ+Fyb98k0G/o9QcRGxA1/O/O/elf1+Qvuwb15phT8GbVtIeNziy66XTPOhKKfdr8KyUg==
962+
963+
"@next/swc-win32-x64-msvc@12.2.4":
964+
version "12.2.4"
965+
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.2.4.tgz#0134c4cd5df39033347614ce5fc26af485ac9048"
966+
integrity sha512-5Pl1tdMJWLy4rvzU1ecx0nHWgDPqoYuvYoXE/5X0Clu9si/yOuBIj573F2kOTY7mu0LX2wgCJVSnyK0abHBxIw==
967967

968968
"@nodelib/fs.scandir@2.1.5":
969969
version "2.1.5"
@@ -2584,31 +2584,31 @@ natural-compare@^1.4.0:
25842584
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
25852585
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
25862586

2587-
next@12.2.3:
2588-
version "12.2.3"
2589-
resolved "https://registry.yarnpkg.com/next/-/next-12.2.3.tgz#c29d235ce480e589894dfab3120dade25d015a22"
2590-
integrity sha512-TA0tmSA6Dk6S6kfvCNbF7CWYW8468gZUxr/3/30z4KvAQbXnl2ASYZElVe7q/hBW/1F1ee0tSBlHa4/sn+ZIBw==
2587+
next@12.2.4:
2588+
version "12.2.4"
2589+
resolved "https://registry.yarnpkg.com/next/-/next-12.2.4.tgz#88f7a7a4cd76063704cda28b3b07c4217b8928b0"
2590+
integrity sha512-b1xlxEozmAWokAXzXsi5vlmU/IfJcFNIJA8dpU5UdkFbyDPio8wwb8mAQ/Y7rGtfTgG/t/u49BiyEA+xAgFvow==
25912591
dependencies:
2592-
"@next/env" "12.2.3"
2592+
"@next/env" "12.2.4"
25932593
"@swc/helpers" "0.4.3"
25942594
caniuse-lite "^1.0.30001332"
25952595
postcss "8.4.14"
25962596
styled-jsx "5.0.2"
25972597
use-sync-external-store "1.2.0"
25982598
optionalDependencies:
2599-
"@next/swc-android-arm-eabi" "12.2.3"
2600-
"@next/swc-android-arm64" "12.2.3"
2601-
"@next/swc-darwin-arm64" "12.2.3"
2602-
"@next/swc-darwin-x64" "12.2.3"
2603-
"@next/swc-freebsd-x64" "12.2.3"
2604-
"@next/swc-linux-arm-gnueabihf" "12.2.3"
2605-
"@next/swc-linux-arm64-gnu" "12.2.3"
2606-
"@next/swc-linux-arm64-musl" "12.2.3"
2607-
"@next/swc-linux-x64-gnu" "12.2.3"
2608-
"@next/swc-linux-x64-musl" "12.2.3"
2609-
"@next/swc-win32-arm64-msvc" "12.2.3"
2610-
"@next/swc-win32-ia32-msvc" "12.2.3"
2611-
"@next/swc-win32-x64-msvc" "12.2.3"
2599+
"@next/swc-android-arm-eabi" "12.2.4"
2600+
"@next/swc-android-arm64" "12.2.4"
2601+
"@next/swc-darwin-arm64" "12.2.4"
2602+
"@next/swc-darwin-x64" "12.2.4"
2603+
"@next/swc-freebsd-x64" "12.2.4"
2604+
"@next/swc-linux-arm-gnueabihf" "12.2.4"
2605+
"@next/swc-linux-arm64-gnu" "12.2.4"
2606+
"@next/swc-linux-arm64-musl" "12.2.4"
2607+
"@next/swc-linux-x64-gnu" "12.2.4"
2608+
"@next/swc-linux-x64-musl" "12.2.4"
2609+
"@next/swc-win32-arm64-msvc" "12.2.4"
2610+
"@next/swc-win32-ia32-msvc" "12.2.4"
2611+
"@next/swc-win32-x64-msvc" "12.2.4"
26122612

26132613
node-addon-api@^2.0.0:
26142614
version "2.0.2"

package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "web3-onboard-monorepo",
3-
"version": "2.9.0",
3+
"version": "2.10.0",
44
"private": true,
5-
"workspaces": [
6-
"./packages/*"
7-
],
5+
"workspaces": {
6+
"packages": ["./packages/*"],
7+
"nohoist": ["**/react", "**/react-dom", "**/csstype"]
8+
},
89
"description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
910
"keywords": [
1011
"Ethereum",
@@ -51,7 +52,7 @@
5152
"format": "prettier --write 'packages/**/*.ts'",
5253
"dev": "yarn wsrun dev",
5354
"build": "yarn wsrun --serial build",
54-
"type-check": "yarn wsrun type-check"
55+
"check": "yarn wsrun type-check"
5556
},
5657
"devDependencies": {
5758
"prettier": "^2.4.1",

packages/coinbase/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/coinbase",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "Coinbase SDK wallet module for connecting to Web3-Onboard. Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -59,6 +59,6 @@
5959
},
6060
"dependencies": {
6161
"@coinbase/wallet-sdk": "^3.0.5",
62-
"@web3-onboard/common": "^2.2.1"
62+
"@web3-onboard/common": "^2.2.2"
6363
}
6464
}

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/common",
3-
"version": "2.2.1",
3+
"version": "2.2.2",
44
"description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",

packages/common/src/types.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,8 @@ export enum ProviderRpcErrorCode {
372372
DISCONNECTED = 4900,
373373
CHAIN_DISCONNECTED = 4901,
374374
CHAIN_NOT_ADDED = 4902,
375-
DOES_NOT_EXIST = -32601
375+
DOES_NOT_EXIST = -32601,
376+
UNRECOGNIZED_CHAIN_ID = -32603
376377
}
377378

378379
export interface Chain {

packages/core/.eslintrc.cjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ module.exports = {
3838
}
3939
],
4040
'object-curly-spacing': ['error', 'always'],
41-
'@typescript-eslint/no-empty-function': 'off'
41+
'@typescript-eslint/no-empty-function': 'off',
42+
quotes: ['error', 'single', { allowTemplateLiterals: true }]
4243
}
4344
}

packages/core/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/core",
3-
"version": "2.8.1",
3+
"version": "2.8.2",
44
"description": "Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardized spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, multi-chain and multi-account support, reactive wallet state subscriptions and real-time transaction state change notifications.",
55
"keywords": [
66
"Ethereum",
@@ -82,7 +82,7 @@
8282
"typescript": "^4.5.5"
8383
},
8484
"dependencies": {
85-
"@web3-onboard/common": "^2.2.1",
85+
"@web3-onboard/common": "^2.2.2",
8686
"bignumber.js": "^9.0.0",
8787
"bnc-sdk": "^4.4.1",
8888
"bowser": "^2.11.0",

packages/core/src/chain.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ async function setChain(options: {
6767
map(() => false)
6868
)
6969

70-
if (code === ProviderRpcErrorCode.CHAIN_NOT_ADDED) {
70+
if (
71+
code === ProviderRpcErrorCode.CHAIN_NOT_ADDED ||
72+
code === ProviderRpcErrorCode.UNRECOGNIZED_CHAIN_ID
73+
) {
7174
// chain has not been added to wallet
7275
try {
7376
await addNewChain(wallet.provider, chain)

packages/core/src/replacement.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ const WALLETS_SUPPORT_REPLACEMENT: WalletState['label'][] = [
1212
'Ledger',
1313
'Trezor',
1414
'Keystone',
15-
'Keepkey'
15+
'KeepKey',
16+
`D'CENT`
1617
]
1718

1819
export const actionableEventCode = (eventCode: string): boolean =>

packages/dcent/README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,48 @@ const onboard = Onboard({
2525
const connectedWallets = await onboard.connectWallet()
2626
console.log(connectedWallets)
2727
```
28+
29+
### Filtering Platforms
30+
31+
You may decide that on certain platforms you do not want to display this wallet as a selectable option. To do that you can use the `filter` init option which is an array of platforms that you would like this wallet to **not** be displayed to the end user:
32+
33+
```typescript
34+
import Onboard from '@web3-onboard/core'
35+
import dcentModule from '@web3-onboard/dcent'
36+
37+
const dcent = dcentModule({ filter: ['Safari'] })
38+
39+
const onboard = Onboard({
40+
// ... other Onboard options
41+
wallets: [
42+
dcent
43+
//... other wallets
44+
]
45+
})
46+
47+
const connectedWallets = await onboard.connectWallet()
48+
console.log(connectedWallets)
49+
```
50+
51+
The following is a list of the platforms that can be filtered:
52+
53+
```typescript
54+
type Platform =
55+
| 'Windows Phone'
56+
| 'Windows'
57+
| 'macOS'
58+
| 'iOS'
59+
| 'Android'
60+
| 'Linux'
61+
| 'Chrome OS'
62+
| 'Android Browser'
63+
| 'Chrome'
64+
| 'Chromium'
65+
| 'Firefox'
66+
| 'Microsoft Edge'
67+
| 'Opera'
68+
| 'Safari'
69+
| 'desktop'
70+
| 'mobile'
71+
| 'tablet'
72+
```

0 commit comments

Comments
 (0)