Skip to content

Commit

Permalink
Fix switch chain when chain isnt available in wallet already (#2281)
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamj1232 authored Sep 4, 2024
1 parent 032635d commit c8491ed
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"@web3-onboard/capsule": "^2.3.0",
"@web3-onboard/cede-store": "^2.3.1",
"@web3-onboard/coinbase": "^2.3.1",
"@web3-onboard/core": "^2.22.3-alpha.1",
"@web3-onboard/core": "^2.22.3-alpha.2",
"@web3-onboard/dcent": "^2.2.8",
"@web3-onboard/enkrypt": "^2.1.1",
"@web3-onboard/fortmatic": "^2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/core",
"version": "2.22.3-alpha.1",
"version": "2.22.3-alpha.2",
"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.",
"keywords": [
"Ethereum",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ export function addNewChain(
rpcUrls: [chain.publicRpcUrl || chain.rpcUrl],
blockExplorerUrls: chain.blockExplorerUrl
? [chain.blockExplorerUrl]
: undefined
: null
}
]
})
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/views/chain/SwitchChain.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import en from '../../i18n/en.json'
import CloseButton from '../shared/CloseButton.svelte'
import Modal from '../shared/Modal.svelte'
import { state } from '../../store/index.js'
import { shareReplay, startWith } from 'rxjs/operators'
const nextNetworkName = $switchChainModal$.chain.label
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"@web3-onboard/bloom": "2.0.0",
"@web3-onboard/capsule": "^2.3.0",
"@web3-onboard/cede-store": "^2.3.1",
"@web3-onboard/core": "2.22.3-alpha.1",
"@web3-onboard/core": "2.22.3-alpha.2",
"@web3-onboard/coinbase": "^2.4.1",
"@web3-onboard/dcent": "^2.2.7",
"@web3-onboard/enkrypt": "^2.1.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/react",
"version": "2.9.3-alpha.1",
"version": "2.9.3-alpha.2",
"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.",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -61,7 +61,7 @@
"typescript": "^5.4.5"
},
"dependencies": {
"@web3-onboard/core": "2.22.3-alpha.1",
"@web3-onboard/core": "2.22.3-alpha.2",
"@web3-onboard/common": "^2.4.1",
"use-sync-external-store": "1.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/solid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/solid",
"version": "2.1.3-alpha.1",
"version": "2.1.3-alpha.2",
"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.",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -63,7 +63,7 @@
},
"dependencies": {
"@web3-onboard/common": "^2.4.1",
"@web3-onboard/core": "2.22.3-alpha.1",
"@web3-onboard/core": "2.22.3-alpha.2",
"solid-js": "^1.8.1"
}
}
4 changes: 2 additions & 2 deletions packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/vue",
"version": "2.8.3-alpha.1",
"version": "2.8.3-alpha.2",
"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.",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -62,7 +62,7 @@
"@vueuse/core": "^8.4.2",
"@vueuse/rxjs": "^8.2.0",
"@web3-onboard/common": "^2.4.1",
"@web3-onboard/core": "2.22.3-alpha.1",
"@web3-onboard/core": "2.22.3-alpha.2",
"vue-demi": "^0.12.4"
},
"peerDependencies": {
Expand Down

0 comments on commit c8491ed

Please sign in to comment.