Skip to content

Commit 3ef0fa8

Browse files
authored
stop calling selectAccounts when switching already connected wallet and update packages (#1595)
1 parent 9e9696f commit 3ef0fa8

File tree

12 files changed

+15
-32
lines changed

12 files changed

+15
-32
lines changed

docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"dependencies": {
5757
"bnc-sdk": "^4.6.6",
5858
"@web3-onboard/coinbase": "^2.1.4",
59-
"@web3-onboard/core": "^2.15.5",
59+
"@web3-onboard/core": "^2.15.6-alpha.2",
6060
"@web3-onboard/dcent": "^2.2.3",
6161
"@web3-onboard/enkrypt": "^2.0.0",
6262
"@web3-onboard/fortmatic": "^2.0.14",

examples/with-ledger/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"dependencies": {
1212
"@web3-onboard/ledger": "^2.1.6",
13-
"@web3-onboard/react": "^2.4.1",
13+
"@web3-onboard/react": "^2.6.7-alpha.2",
1414
"next": "12.2.4",
1515
"react": "18.2.0",
1616
"react-dom": "18.2.0"

examples/with-nextjs-13/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"@web3-onboard/magic": "^2.1.3",
2424
"@web3-onboard/mew-wallet": "^2.0.0",
2525
"@web3-onboard/portis": "^2.1.3",
26-
"@web3-onboard/react": "^2.6.1",
26+
"@web3-onboard/react": "^2.6.7-alpha.2",
2727
"@web3-onboard/sequence": "^2.0.3",
2828
"@web3-onboard/taho": "^2.0.0",
2929
"@web3-onboard/torus": "^2.1.3",

examples/with-nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12-
"@web3-onboard/react": "2.4.1",
12+
"@web3-onboard/react": "2.6.7-alpha.2",
1313
"next": "12.2.5",
1414
"react": "18.2.0",
1515
"react-dom": "18.2.0"

examples/with-vite-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"@web3-onboard/magic": "^2.1.3",
2121
"@web3-onboard/mew": "^2.1.3",
2222
"@web3-onboard/portis": "^2.1.3",
23-
"@web3-onboard/react": "^2.4.1",
23+
"@web3-onboard/react": "^2.6.7-alpha.2",
2424
"@web3-onboard/sequence": "^2.0.3",
2525
"@web3-onboard/tallyho": "^2.0.1",
2626
"@web3-onboard/torus": "^2.1.3",

examples/with-vuejs-v2/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"dependencies": {
1010
"@web3-onboard/injected-wallets": "^2.6.2",
11-
"@web3-onboard/vue": "^2.5.1",
11+
"@web3-onboard/vue": "^2.5.7-alpha.2",
1212
"vue": "^2.7.14",
1313
"vue-template-compiler": "2.7.14"
1414
},

examples/with-vuejs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"dependencies": {
1111
"@web3-onboard/injected-wallets": "^2.6.2",
12-
"@web3-onboard/vue": "^2.5.1",
12+
"@web3-onboard/vue": "^2.5.7-alpha.2",
1313
"pinia": "^2.0.29",
1414
"vue": "^3.2.45",
1515
"vue-router": "^4.1.6"

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.15.5",
3+
"version": "2.15.6-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/views/connect/Index.svelte

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import { BigNumber } from 'ethers'
55
import { _ } from 'svelte-i18n'
66
import en from '../../i18n/en.json'
7-
import { listenAccountsChanged, selectAccounts } from '../../provider.js'
7+
import { listenAccountsChanged } from '../../provider.js'
88
import { state } from '../../store/index.js'
99
import { connectWallet$, onDestroy$ } from '../../streams.js'
1010
import { addWallet, updateAccount } from '../../store/actions.js'
@@ -118,24 +118,7 @@
118118
if (existingWallet) {
119119
// set as first wallet
120120
addWallet(existingWallet)
121-
122-
try {
123-
await selectAccounts(existingWallet.provider)
124-
// change step on next event loop
125-
setTimeout(() => setStep('connectedWallet'), 1)
126-
} catch (error) {
127-
const { code } = error as { code: number }
128-
129-
if (
130-
code === ProviderRpcErrorCode.UNSUPPORTED_METHOD ||
131-
code === ProviderRpcErrorCode.DOES_NOT_EXIST
132-
) {
133-
connectWallet$.next({
134-
inProgress: false,
135-
actionRequired: existingWallet.label
136-
})
137-
}
138-
}
121+
setTimeout(() => setStep('connectedWallet'), 1)
139122
140123
selectedWallet = existingWallet
141124

packages/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"webpack-dev-server": "4.7.4"
2424
},
2525
"dependencies": {
26-
"@web3-onboard/core": "^2.15.5",
26+
"@web3-onboard/core": "^2.15.6-alpha.2",
2727
"@web3-onboard/coinbase": "^2.1.4",
2828
"@web3-onboard/transaction-preview": "^2.0.4",
2929
"@web3-onboard/dcent": "^2.2.3",

0 commit comments

Comments
 (0)