Skip to content

wallet_addEthereumChain doesn't get redirect to Metamask #227

@ammarvohra

Description

@ammarvohra

Describe the bug
Some of my users has this issue that when they try to add chain network, they are not taken back to Metamask from my Game, instead it throws error:

Fatal Exception: java.lang.Exception: WalletConnectException : No matching key with tag: {tag}
       at WalletConnectSharp.Sign.Engine.IsValidSessionTopic(WalletConnectSharp.Sign.Engine)
       at WalletConnectSharp.Sign.Engine.Request[T,TR](WalletConnectSharp.Sign.Engine)
       at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult].Start[TStateMachine](System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[TResult])
       at WalletConnectSharp.Sign.Engine.Request[T,TR](WalletConnectSharp.Sign.Engine)
       at WalletConnectSharp.Sign.WalletConnectSignClient.Request[T,TR](WalletConnectSharp.Sign.WalletConnectSignClient)
       at WalletConnectUnity.Core.WalletConnect.RequestAsync[TRequestData,TResponse](WalletConnectUnity.Core.WalletConnect)

To Reproduce
Steps to reproduce the behavior:

  1. I connect metamask and Unity Game on Android
  2. I came back to my game after authorization and then I click Unity button to add new network on Metamask
  3. It doesn't take me back to Metamask application

Expected behavior
It should take me to Metamask application where a popup appears to add new network chain

Screenshots

Environment

  • OS: Build on Windows 10 game running on Android 10
  • Unity version 2022.3.20
  • WalletConnectUnity Modal v1.1.5

Is this happening in Unity Editor or on a player like Android, iOS, Windows?
Android 10

Wallets used for testing
Metamask

Additional context
None

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions