WalletConnect / WalletConnectSwiftV2

WalletConnect Swift SDK v2
https://docs.walletconnect.com
Apache License 2.0
368 stars 180 forks source link

Receiving Sepolia chainId when buying NFT on Mumbai network from OpenSea Testnet #977

Open ngocpd-1250 opened 1 year ago

ngocpd-1250 commented 1 year ago

Describe the bug Receiving GETH chainId when buying NFT on Mumbai network from OpenSea Testnet via WalletConnect (It works well with MetaMask.)

My session namespaces: ["eip155": WalletConnectSign.SessionNamespace(chains: Optional(Set([eip155:5, eip155:80001])), accounts: Set([eip155:80001:0xf24ac6dc44c8ed6ce036714973ef4c993fb8296f, eip155:5:0xf24ac6dc44c8ed6ce036714973ef4c993fb8296f]), methods: Set(["eth_sendTransaction", "eth_signTypedData_v4", "personal_sign"]), events: Set(["chainChanged", "accountsChanged"]))]

SDK Version

To Reproduce Steps to reproduce the behavior:

  1. Connect your wallet with open-sea via WalletConnect
  2. Go to this link: https://testnets.opensea.io/assets/mumbai/0x2631aec1028bed281506b0521a49fd55ba2a90f9/2
  3. Click Buy.
  4. When I buy NFTs on Mumbai from the show link, occasionally I receive the chainID of GETH in the request.

Expected behavior Receive the chainID of Mumbai in the request.

Screenshots Request(id: 1690207798996607, topic: "0c464c416f30ff487b753332aec78da58c21df68e09ee3c433ddc1b2714ba1cc", method: "eth_sendTransaction", params: AnyCodable: "[{"data":"0xe7acab24.....","gas":"0x27457","to":"0x00000000000000adc04c56bf30ac9d3c0aaf14dc","value":"0xe8d4a51000"}]", chainId: eip155:5, expiry: nil)

Screenshot 2023-07-24 at 21 10 04
flypaper0 commented 1 year ago

Thanks, forwarded problem to OpenSea team

ngocpd-1250 commented 1 year ago

@flypaper0 I don't think this is a problem with OpenSea. I have tried using Android and didn't experience this issue.

Screenshot 2023-07-26 at 15 33 19

Request(id: 1690360649362097, topic: "c35fdb6afcee89cba97716d57d6337e377ebe99954ed9dc85c79b6b409389169", method: "eth_sendTransaction", params: AnyCodable: "[{"data":"0xe7acab24.....","gas":"0x2cb2d","to":"0x00000000000000adc04c56bf30ac9d3c0aaf14dc","value":"0xe8d4a51000"}]", chainId: eip155:5, expiry: nil)

ngocpd-1250 commented 1 year ago

@flypaper0 @alexander-lsvk I reproduce this problem by changing supportedChains to: let supportedChains = [Blockchain("eip155:5")!, Blockchain("eip155:80001")!] https://www.dropbox.com/scl/fi/i7gkxp2mx06thwbbxmb5z/reproduce_bug.mov?rlkey=d6bz7smemp5kajcjbb5sx8t1w&dl=0

Please help me check

ngocpd-1250 commented 1 year ago

Currently, Opensea has changed the required chain to Sepolia, but I am still encountering the same issue. When I purchase an NFT on Mumbai, I am still receiving the chainId of Sepolia. (It occasionally occurs)

let supportedChains = [Blockchain("eip155:5")!, Blockchain("eip155:80001")!, Blockchain("eip155:11155111")!]