web3-react
web3-react copied to clipboard
WalletConnectConnector cannot automatically switch the rpc when the first time connecting other supported chainId
I've set the default ChainId in 137, and Set the chainId in my wallet is 421611, after activating the WalletConnectConnector, it seems strange. Seeing the pic.

I think the rpc should also changed like the chainId does, but it doesnt But it do can auto switch the rpc with its related chainId after refreshing the page.
Does anyone meet the same problem?
And my settings is here, version "@web3-react/walletconnect-connector": "^7.0.2-alpha.0",

I'm also facing the very same issue. I'm providing the goerli test network as rpc, but it's getting Ethereum mainnet the first time. After a refresh, it gets the correct one. Any solution?
We are facing the same issue. A "workaround" is to call activate, deactivate, and activate again. But the UX requires multiple scans of QR code on the wallet connect device. The connector has the correct chain id in sync with phone but the rpc url for the http provider is never updated away from its original default chain id url.
So, have the official developers of the library solved this bug, or do you have a solution? I look forward to sharing
Just provide a chainId in WalletConnectConnector constructor object.
Should be like this, works for me:

Just provide a chainId in WalletConnectConnector constructor object.
Should be like this, works for me:
This breaks something else. If you have two chains it won't work
export const walletconnect = new WalletConnectConnector({
rpc: {
1: RPC_URLS[1],
56: RPC_URLS[56]
},
chainId: 1,
qrcode: true
})
And don't try chainId: [1,56] or whatever, it won't work. It will still default to ethereum for some reasons. I'm tired of this issue from @web3-react and it has been going on forever with no intention to being fixed