Uniswap / Uniswap/interface

Switched chain is not reflected in the address and balance

Open
#7,859 10 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

If the wallet uses different addresses for different chains, switching the cryptocurrency for exchange does not update the address and balance.

Image

Page reload updates the address and balance to the correct values.

Image

WalletConnect approved session namespace:

{
    "eip155": {
        "chains": [
            "eip155:1",
            "eip155:42161",
            "eip155:56"
        ],
        "methods": [
            "eth_accounts",
            "eth_requestAccounts",
            "eth_sendRawTransaction",
            "eth_sign",
            "eth_signTransaction",
            "eth_signTypedData",
            "eth_signTypedData_v3",
            "eth_signTypedData_v4",
            "eth_sendTransaction",
            "personal_sign",
            "wallet_switchEthereumChain",
            "wallet_addEthereumChain",
            "wallet_getPermissions",
            "wallet_requestPermissions",
            "wallet_registerOnboarding",
            "wallet_watchAsset",
            "wallet_scanQRCode",
            "wallet_sendCalls",
            "wallet_getCapabilities",
            "wallet_getCallsStatus",
            "wallet_showCallsStatus"
        ],
        "events": [
            "chainChanged",
            "accountsChanged",
            "message",
            "disconnect",
            "connect"
        ],
        "accounts": [
            "eip155:1:0xB6bB59b3aC844e8e4A98A281D57E3E0628bcb471",
            "eip155:42161:0xAd8eDE8697aF92AF31Fe66EDAD9A52A74F74464E",
            "eip155:56:0x9B0d038121EB94CeA52FD08B416056B2824524dd"
        ]
    }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the exchange cryptocurrency switch with the shown WalletConnect session, then compare the displayed address and balance before and after switching chains. Done means both values update to the correct chain-specific values without requiring a page reload.

Written by the indexing model from the issue text.

Assessment

Tech stack
blockchain, typescript
Domain
blockchain, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.