Skip to content

Commit 1100bab

Browse files
authored
[All-Packages]: Fix - Unrecognized chain error support for Mobile Chain addition (#1248)
* Add support for unrecognized chain Id error support when adding a new chain * Yarn it * Bump versions
1 parent b92fdd8 commit 1100bab

File tree

27 files changed

+94
-80
lines changed

27 files changed

+94
-80
lines changed

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-alpha.1",
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-alpha.1"
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-alpha.1",
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/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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-alpha.1",
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/dcent/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/dcent",
3-
"version": "2.2.0-alpha.1",
3+
"version": "2.2.0-alpha.2",
44
"description": "D'CENT 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",
@@ -56,7 +56,7 @@
5656
"typescript": "^4.5.5"
5757
},
5858
"dependencies": {
59-
"@web3-onboard/common": "^2.2.1",
59+
"@web3-onboard/common": "^2.2.2-alpha.1",
6060
"@web3-onboard/hw-common": "^2.0.1",
6161
"@ethereumjs/tx": "^3.4.0",
6262
"@ethersproject/providers": "^5.5.0",

packages/demo/package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@
2222
"webpack-dev-server": "4.7.4"
2323
},
2424
"dependencies": {
25-
"@web3-onboard/coinbase": "^2.1.1",
26-
"@web3-onboard/core": "^2.8.1",
27-
"@web3-onboard/dcent": "^2.2.0-alpha.1",
28-
"@web3-onboard/fortmatic": "^2.0.12",
29-
"@web3-onboard/gas": "^2.1.1",
30-
"@web3-onboard/gnosis": "^2.1.1",
31-
"@web3-onboard/injected-wallets": "^2.2.0",
32-
"@web3-onboard/keepkey": "^2.3.0-alpha.1",
33-
"@web3-onboard/keystone": "^2.3.0-alpha.1",
34-
"@web3-onboard/ledger": "^2.3.0-alpha.1",
35-
"@web3-onboard/magic": "^2.1.1",
36-
"@web3-onboard/portis": "^2.1.1",
37-
"@web3-onboard/sequence": "^2.0.0",
38-
"@web3-onboard/torus": "^2.1.1",
39-
"@web3-onboard/trezor": "^2.3.0-alpha.2",
40-
"@web3-onboard/walletconnect": "^2.1.1",
41-
"@web3-onboard/web3auth": "^2.1.1",
25+
"@web3-onboard/coinbase": "^2.1.2-alpha.1",
26+
"@web3-onboard/core": "^2.8.2-alpha.1",
27+
"@web3-onboard/dcent": "^2.2.0-alpha.2",
28+
"@web3-onboard/fortmatic": "^2.0.13-alpha.1",
29+
"@web3-onboard/gas": "^2.1.2-alpha.1",
30+
"@web3-onboard/gnosis": "^2.1.2-alpha.1",
31+
"@web3-onboard/injected-wallets": "^2.2.1-alpha.1",
32+
"@web3-onboard/keepkey": "^2.3.0-alpha.2",
33+
"@web3-onboard/keystone": "^2.3.0-alpha.2",
34+
"@web3-onboard/ledger": "^2.3.0-alpha.2",
35+
"@web3-onboard/magic": "^2.1.2-alpha.1",
36+
"@web3-onboard/portis": "^2.1.2-alpha.1",
37+
"@web3-onboard/sequence": "^2.0.1-alpha.1",
38+
"@web3-onboard/torus": "^2.1.2-alpha.1",
39+
"@web3-onboard/trezor": "^2.3.0-alpha.3",
40+
"@web3-onboard/walletconnect": "^2.1.2-alpha.1",
41+
"@web3-onboard/web3auth": "^2.1.2-alpha.1",
4242
"vconsole": "^3.9.5"
4343
},
4444
"license": "MIT",

packages/fortmatic/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/fortmatic",
3-
"version": "2.0.12",
3+
"version": "2.0.13-alpha.1",
44
"description": "Fortmatic 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",
@@ -58,7 +58,7 @@
5858
"typescript": "^4.5.5"
5959
},
6060
"dependencies": {
61-
"@web3-onboard/common": "^2.2.1",
61+
"@web3-onboard/common": "^2.2.2-alpha.1",
6262
"fortmatic": "^2.2.1"
6363
}
6464
}

packages/gas/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/gas",
3-
"version": "2.1.1",
3+
"version": "2.1.2-alpha.1",
44
"description": "Estimate the gas prices needed to get a transaction in to the next block for Ethereum Mainnet and Polygon Matic Mainnet.",
55
"keywords": [
66
"gas",
@@ -30,7 +30,7 @@
3030
"typescript": "^4.5.5"
3131
},
3232
"dependencies": {
33-
"@web3-onboard/common": "^2.2.1",
33+
"@web3-onboard/common": "^2.2.2-alpha.1",
3434
"rxjs": "^7.5.2",
3535
"joi": "^17.4.2"
3636
}

packages/gnosis/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/gnosis",
3-
"version": "2.1.1",
3+
"version": "2.1.2-alpha.1",
44
"description": "Gnosis Safe 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
"dependencies": {
6060
"@gnosis.pm/safe-apps-provider": "^0.9.2",
6161
"@gnosis.pm/safe-apps-sdk": "^6.1.1",
62-
"@web3-onboard/common": "^2.2.1"
62+
"@web3-onboard/common": "^2.2.2-alpha.1"
6363
}
6464
}

packages/hw-common/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/hw-common",
3-
"version": "2.0.1",
3+
"version": "2.0.2-alpha.1",
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",
@@ -81,7 +81,7 @@
8181
},
8282
"dependencies": {
8383
"@ethereumjs/common": "2.6.2",
84-
"@web3-onboard/common": "^2.2.1",
84+
"@web3-onboard/common": "^2.2.2-alpha.1",
8585
"ethers": "5.5.4",
8686
"joi": "^17.4.2",
8787
"rxjs": "^7.5.2"

packages/injected/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/injected-wallets",
3-
"version": "2.2.0",
3+
"version": "2.2.1-alpha.1",
44
"description": "Injected wallet module for connecting browser extension and mobile wallets 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",
@@ -62,7 +62,7 @@
6262
"window": "^4.2.7"
6363
},
6464
"dependencies": {
65-
"@web3-onboard/common": "^2.2.1",
65+
"@web3-onboard/common": "^2.2.2-alpha.1",
6666
"joi": "^17.4.2",
6767
"lodash.uniqby": "^4.7.0"
6868
}

packages/keepkey/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/keepkey",
3-
"version": "2.3.0-alpha.1",
3+
"version": "2.3.0-alpha.2",
44
"description": "KeepKey hardware 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",
@@ -63,7 +63,7 @@
6363
"@ethersproject/providers": "^5.5.0",
6464
"@shapeshiftoss/hdwallet-core": "^1.15.2",
6565
"@shapeshiftoss/hdwallet-keepkey-webusb": "^1.15.2",
66-
"@web3-onboard/common": "^2.2.1",
66+
"@web3-onboard/common": "^2.2.2-alpha.1",
6767
"@web3-onboard/hw-common": "^2.0.1",
6868
"ethereumjs-util": "^7.1.3"
6969
}

packages/keystone/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/keystone",
3-
"version": "2.3.0-alpha.1",
3+
"version": "2.3.0-alpha.2",
44
"description": "Keystone hardware 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",
@@ -58,7 +58,7 @@
5858
"@ethereumjs/tx": "^3.4.0",
5959
"@ethersproject/providers": "^5.5.0",
6060
"@keystonehq/eth-keyring": "^0.14.0-alpha.10.3",
61-
"@web3-onboard/common": "^2.2.1",
61+
"@web3-onboard/common": "^2.2.2-alpha.1",
6262
"@web3-onboard/hw-common": "^2.0.1"
6363
}
6464
}

packages/ledger/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/ledger",
3-
"version": "2.3.0-alpha.1",
3+
"version": "2.3.0-alpha.2",
44
"description": "Ledger hardare 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",
@@ -65,7 +65,7 @@
6565
"@ledgerhq/hw-transport-u2f": "^5.36.0-deprecated",
6666
"@ledgerhq/hw-transport-webusb": "^6.19.0",
6767
"@metamask/eth-sig-util": "^4.0.0",
68-
"@web3-onboard/common": "^2.2.1",
68+
"@web3-onboard/common": "^2.2.2-alpha.1",
6969
"@web3-onboard/hw-common": "^2.0.1",
7070
"buffer": "^6.0.3",
7171
"ethereumjs-util": "^7.1.3"

packages/magic/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/magic",
3-
"version": "2.1.1",
3+
"version": "2.1.2-alpha.1",
44
"description": "Magic 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",
@@ -80,7 +80,7 @@
8080
"typescript": "^4.5.5"
8181
},
8282
"dependencies": {
83-
"@web3-onboard/common": "^2.2.1",
83+
"@web3-onboard/common": "^2.2.2-alpha.1",
8484
"joi": "^17.4.2",
8585
"magic-sdk": "^8.1.0",
8686
"rxjs": "^7.5.2"

packages/mew/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/mew",
3-
"version": "2.1.1",
3+
"version": "2.1.2-alpha.1",
44
"description": "MEW (My Ether Wallet) 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,7 +59,7 @@
5959
"@myetherwallet/mewconnect-web-client": "^2.2.0-beta.14"
6060
},
6161
"dependencies": {
62-
"@web3-onboard/common": "^2.2.1",
62+
"@web3-onboard/common": "^2.2.2-alpha.1",
6363
"rxjs": "^7.5.2"
6464
}
6565
}

packages/portis/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/portis",
3-
"version": "2.1.1",
3+
"version": "2.1.2-alpha.1",
44
"description": "Portis 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",
@@ -57,6 +57,6 @@
5757
},
5858
"dependencies": {
5959
"@portis/web3": "^4.0.6",
60-
"@web3-onboard/common": "^2.2.1"
60+
"@web3-onboard/common": "^2.2.2-alpha.1"
6161
}
6262
}

packages/react/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/react",
3-
"version": "2.3.1",
3+
"version": "2.3.2-alpha.1",
44
"description": "A collection of React hooks for integrating Web3-Onboard in to React and Next.js projects. 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, 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",
@@ -62,8 +62,8 @@
6262
"typescript": "^4.5.5"
6363
},
6464
"dependencies": {
65-
"@web3-onboard/core": "^2.8.1",
66-
"@web3-onboard/common": "^2.2.1",
65+
"@web3-onboard/core": "^2.8.2-alpha.1",
66+
"@web3-onboard/common": "^2.2.2-alpha.1",
6767
"use-sync-external-store": "1.0.0"
6868
},
6969
"peerDependencies": {

packages/sequence/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/sequence",
3-
"version": "2.0.0",
3+
"version": "2.0.1-alpha.1",
44
"description": "Sequence is the smartest Web3 wallet. Easy, fun and secure.",
55
"keywords": [
66
"Ethereum",
@@ -56,7 +56,7 @@
5656
"typescript": "^4.5.5"
5757
},
5858
"dependencies": {
59-
"@web3-onboard/common": "^2.1.7",
59+
"@web3-onboard/common": "^2.2.2-alpha.1",
6060
"0xsequence": "^0.40.5"
6161
}
6262
}

packages/torus/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/torus",
3-
"version": "2.1.1",
3+
"version": "2.1.2-alpha.1",
44
"description": "Torus 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",
@@ -57,6 +57,6 @@
5757
},
5858
"dependencies": {
5959
"@toruslabs/torus-embed": "^1.18.3",
60-
"@web3-onboard/common": "^2.2.1"
60+
"@web3-onboard/common": "^2.2.2-alpha.1"
6161
}
6262
}

packages/trezor/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/trezor",
3-
"version": "2.3.0-alpha.2",
3+
"version": "2.3.0-alpha.3",
44
"description": "Trezor hardware 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",
@@ -60,7 +60,7 @@
6060
"dependencies": {
6161
"@ethereumjs/tx": "^3.4.0",
6262
"@ethersproject/providers": "^5.5.0",
63-
"@web3-onboard/common": "^2.2.1",
63+
"@web3-onboard/common": "^2.2.2-alpha.1",
6464
"@web3-onboard/hw-common": "^2.0.1",
6565
"buffer": "^6.0.3",
6666
"eth-crypto": "^2.1.0",

packages/vue/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/vue",
3-
"version": "2.2.1",
3+
"version": "2.2.2-alpha.1",
44
"description": "A collection of Vue Composables for integrating Web3-Onboard in to a Vue or Nuxt project. 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, 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",
@@ -62,8 +62,8 @@
6262
"dependencies": {
6363
"@vueuse/core": "^8.4.2",
6464
"@vueuse/rxjs": "^8.2.0",
65-
"@web3-onboard/common": "^2.2.1",
66-
"@web3-onboard/core": "^2.8.1",
65+
"@web3-onboard/common": "^2.2.2-alpha.1",
66+
"@web3-onboard/core": "^2.8.2-alpha.1",
6767
"vue-demi": "^0.12.4"
6868
},
6969
"peerDependencies": {

0 commit comments

Comments
 (0)