File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
legacy_packages/wallets/src/evm/connectors/wallet-connect Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @thirdweb-dev/wallets " : patch
3
+ ---
4
+
5
+ Always start new WalletConnect session when calling ` connect ` method for WalletConnect connector
Original file line number Diff line number Diff line change @@ -124,15 +124,9 @@ export class WalletConnectConnector extends WagmiConnector<
124
124
const provider = await this . getProvider ( ) ;
125
125
this . setupListeners ( ) ;
126
126
127
- const isChainsStale = await this . _isChainsStale ( ) ;
128
-
129
- // If there is an active session with stale chains, disconnect the current session.
130
- if ( provider . session && isChainsStale ) {
127
+ if ( provider . session ) {
131
128
await provider . disconnect ( ) ;
132
- }
133
129
134
- // If there no active session, or the chains are stale, connect.
135
- if ( ! provider . session || isChainsStale ) {
136
130
const optionalChains = this . filteredChains
137
131
. filter ( ( chain ) => chain . chainId !== targetChainId )
138
132
. map ( ( optionalChain ) => optionalChain . chainId ) ;
You can’t perform that action at this time.
0 commit comments