WalletConnect / walletconnect-monorepo

WalletConnect Monorepo
Apache License 2.0
1.26k stars 626 forks source link

EthereumProvider `wallet_switchEthereumChain` request only redirects to the wallet the first request, and doesnt redirect anymore requests. #4398

Closed rouzwelt closed 2 months ago

rouzwelt commented 2 months ago

Describe the bug EthereumProvider wallet_switchEthereumChain request only redirects to the wallet the first request, and doesnt redirect anymore requests. so the first time the request is made from the app, it successfully redirects to the wallet (in this case metamask) and by clicking ok everything works fine, after that switching to another network from the app, will not redirect the request to the wallet anymore, however lookslike ti resolves in success silently in the backgoround without user noticing anything on their wallet.

SDK Version (if relevant)

To Reproduce Steps to reproduce the behavior:

  1. init the EthereumProvider and connect with a mobile wallet (like metamask mobile) to the app
  2. try switching the chain with:
    await walletconnectProvider?.request({
        method: "wallet_switchEthereumChain",
        params: [{ chainId: chainid.toString(16) }],
    });
  3. accept the request on the wallet
  4. try switching the network again like above and this time no request is redirected to the user wallet

Expected behavior Any switch network request from the dapp should be redirected to the user wallet

Desktop (please complete the following information):

linear[bot] commented 2 months ago

CS-43 EthereumProvider `wallet_switchEthereumChain` request only redirects to the wallet the first request, and doesnt redirect anymore requests.

glitch-txs commented 2 months ago

Hi, this is being addressed on the MetaMask side and will be fix. Thanks!