Skip to content

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

Open
@mahnunchik

Description

@mahnunchik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions