Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chain switch is not reflected in address and balance #761

Open
mahnunchik opened this issue Mar 21, 2025 · 0 comments
Open

Chain switch is not reflected in address and balance #761

mahnunchik opened this issue Mar 21, 2025 · 0 comments

Comments

@mahnunchik
Copy link

I'm experiencing an issue with a dApp when connecting via WalletConnect to a wallet that uses different addresses for different chains.

Example of approved namespaces from the connected WalletConnect session:

{
    "eip155": {
        "chains": [
            "eip155:42161",
            "eip155:1",
            "eip155:8453",
            "eip155:137"
        ],
        "methods": [...],
        "events": [...],
        "accounts": [
            "eip155:42161:0xAd8eDE8697aF92AF31Fe66EDAD9A52A74F74464E",
            "eip155:1:0xB6bB59b3aC844e8e4A98A281D57E3E0628bcb471",
            "eip155:8453:0x750b363f6FBD64Ae2c8671972a97e928c8a0fD34",
            "eip155:137:0x9492A87Fc4c112Fe10123B1D3Aa6fBa5e14F1479"
        ]
    }
}

As you can see, each chain uses a different address.

Steps to reproduce:

  1. Open https://coin.space/wallet/ or any other wallet that uses different addresses for different chains
  2. Connect the dApp to the wallet using WalletConnect
  3. Switch the chain in the dApp interface

Expected behavior:
The address should change and the balance should update based on the selected chain.

Actual behavior:
The address stays the same as it was for the previous chain.

Refreshing the dApp page fixes the issue — the correct address and balance are then shown.

The root cause is in the WalletConnect library: WalletConnect/walletconnect-monorepo#5706 A fix has been prepared but hasn't been merged yet

The same issue occurs in other dApps as well:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant