Skip to content

Commit 0af0bcc

Browse files
committed
Fix switch chain when chain isnt available in wallet already
1 parent 032635d commit 0af0bcc

File tree

8 files changed

+12
-10
lines changed

8 files changed

+12
-10
lines changed

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@web3-onboard/capsule": "^2.3.0",
5858
"@web3-onboard/cede-store": "^2.3.1",
5959
"@web3-onboard/coinbase": "^2.3.1",
60-
"@web3-onboard/core": "^2.22.3-alpha.1",
60+
"@web3-onboard/core": "^2.22.3-alpha.2",
6161
"@web3-onboard/dcent": "^2.2.8",
6262
"@web3-onboard/enkrypt": "^2.1.1",
6363
"@web3-onboard/fortmatic": "^2.1.1",

packages/core/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/core",
3-
"version": "2.22.3-alpha.1",
3+
"version": "2.22.3-alpha.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",

packages/core/src/provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ export function addNewChain(
502502
rpcUrls: [chain.publicRpcUrl || chain.rpcUrl],
503503
blockExplorerUrls: chain.blockExplorerUrl
504504
? [chain.blockExplorerUrl]
505-
: undefined
505+
: null
506506
}
507507
]
508508
})

packages/core/src/views/chain/SwitchChain.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import en from '../../i18n/en.json'
55
import CloseButton from '../shared/CloseButton.svelte'
66
import Modal from '../shared/Modal.svelte'
7+
import { state } from '../../store/index.js'
8+
import { shareReplay, startWith } from 'rxjs/operators'
79
810
const nextNetworkName = $switchChainModal$.chain.label
911

packages/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@web3-onboard/bloom": "2.0.0",
3535
"@web3-onboard/capsule": "^2.3.0",
3636
"@web3-onboard/cede-store": "^2.3.1",
37-
"@web3-onboard/core": "2.22.3-alpha.1",
37+
"@web3-onboard/core": "2.22.3-alpha.2",
3838
"@web3-onboard/coinbase": "^2.4.1",
3939
"@web3-onboard/dcent": "^2.2.7",
4040
"@web3-onboard/enkrypt": "^2.1.1",

packages/react/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/react",
3-
"version": "2.9.3-alpha.1",
3+
"version": "2.9.3-alpha.2",
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",
@@ -61,7 +61,7 @@
6161
"typescript": "^5.4.5"
6262
},
6363
"dependencies": {
64-
"@web3-onboard/core": "2.22.3-alpha.1",
64+
"@web3-onboard/core": "2.22.3-alpha.2",
6565
"@web3-onboard/common": "^2.4.1",
6666
"use-sync-external-store": "1.0.0"
6767
},

packages/solid/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/solid",
3-
"version": "2.1.3-alpha.1",
3+
"version": "2.1.3-alpha.2",
44
"description": "A collection of solid Composables for integrating Web3-Onboard in to a Solid project. 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, 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
},
6464
"dependencies": {
6565
"@web3-onboard/common": "^2.4.1",
66-
"@web3-onboard/core": "2.22.3-alpha.1",
66+
"@web3-onboard/core": "2.22.3-alpha.2",
6767
"solid-js": "^1.8.1"
6868
}
6969
}

packages/vue/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/vue",
3-
"version": "2.8.3-alpha.1",
3+
"version": "2.8.3-alpha.2",
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 standardized 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,7 +62,7 @@
6262
"@vueuse/core": "^8.4.2",
6363
"@vueuse/rxjs": "^8.2.0",
6464
"@web3-onboard/common": "^2.4.1",
65-
"@web3-onboard/core": "2.22.3-alpha.1",
65+
"@web3-onboard/core": "2.22.3-alpha.2",
6666
"vue-demi": "^0.12.4"
6767
},
6868
"peerDependencies": {

0 commit comments

Comments
 (0)