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

[WalletConnect] Cross-Chain swap to an incorrect address #7864

Open
mahnunchik opened this issue Mar 17, 2025 · 1 comment
Open

[WalletConnect] Cross-Chain swap to an incorrect address #7864

mahnunchik opened this issue Mar 17, 2025 · 1 comment

Comments

@mahnunchik
Copy link

It seems that the issue related not switching addresses when changing chains runs much deeper, and the logic for handling different chains does not account for the possibility that different chains might have different addresses.

Steps to Reproduce:

  1. Connect a wallet via WalletConnect that uses different addresses for different chains, such as https://coin.space/wallet/

WalletConnect approved session namespace:

{
    "eip155": {
        "chains": [
            "eip155:1",
            "eip155:42161",
            "eip155:10"
        ],
       // ...
        "accounts": [
            "eip155:1:0xB6bB59b3aC844e8e4A98A281D57E3E0628bcb471",
            "eip155:42161:0xAd8eDE8697aF92AF31Fe66EDAD9A52A74F74464E",
            "eip155:10:0x0CFfE8EF251B2C8Ee2481F0142b531715877D417"
        ]
    }
}
  1. Initiate a swap (in my case, OP ETH to ARB ETH).

Image

  1. Confirm the swap.

Expected Behavior

ARB ETH should be sent to the correct address.

Actual Behavior

ARB ETH was sent to the same address as OP ETH, but on the ARB chain.

@Maliksb11
Copy link

Happy 😁 day

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

2 participants