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

[bug] Network Switch & Sign Message Issues on Mobile Wallet via WalletConnect #3788

Open
Sidharth1013 opened this issue Feb 4, 2025 · 2 comments
Labels
bug Something isn't working

Comments

@Sidharth1013
Copy link

Sidharth1013 commented Feb 4, 2025

Summary

When using MetaMask Mobile to log into the AppKit Lab demo locally via WalletConnect, switching to a network that is not already added in the wallet (e.g., BSC Testnet) does not prompt the expected permission request. Instead, the app briefly displays "Approve in Wallet" for 2-3 seconds before switching the network on the app. However, the network does not get added or switched in the mobile wallet.

Additionally, when attempting to Sign Message, the network automatically switches back to Ethereum Mainnet or Sepolia Testnet instead of processing the signature request on the selected network (which was not initially available in the wallet). This behavior is inconsistent and prevents proper interaction on custom networks.

Expected Behavior

  • When switching to a network that is not added in the mobile wallet, WalletConnect should trigger a permission request for the user to Add and - Switch the Network in MetaMask Mobile.
  • Once switched, the selected network should persist and not revert back when signing messages.
  • For transaction-related interactions (e.g., sending tokens), the provider should correctly calculate the gas price without errors.

Current Behavior

  • No permission prompt appears when switching to an unadded network.
  • The network switch does not reflect on MetaMask Mobile.
  • Upon signing a message, the network automatically switches back to Ethereum Mainnet/Sepolia instead of proceeding with the signature.
  • For BSC Testnet, sending tokens fails due to a provider error while trying to calculate gas price.

Steps to Reproduce

  • Log into the AppKit Lab demo locally via WalletConnect using MetaMask Mobile.
  • Switch to a network not previously added in the mobile wallet.
  • Observe that there is no permission request to add/switch the network in MetaMask Mobile.
  • Click SIGN MESSAGE while on the unadded network.
  • Notice that instead of the selected network, the network displayed on the mobile wallet is used for signing.
Image Image Image

On trying Sign Message with bscTestnet shown on the app, it uses the network shown in the mobile wallet instead
Image

List of related npm package versions

Using the repo with appkit version 1.6.5

Node.js Version

18.20.6

Package Manager

[email protected]

@Sidharth1013 Sidharth1013 added bug Something isn't working needs review labels Feb 4, 2025
Copy link

linear bot commented Feb 4, 2025

@Sidharth1013 Sidharth1013 changed the title Network Switch & Sign Message Issues on MetaMask Mobile via WalletConnect [bug] Network Switch & Sign Message Issues on MetaMask Mobile via WalletConnect Feb 4, 2025
@Sidharth1013 Sidharth1013 changed the title [bug] Network Switch & Sign Message Issues on MetaMask Mobile via WalletConnect [bug] Network Switch & Sign Message Issues on Mobile Wallet via WalletConnect Feb 4, 2025
Copy link

Thanks for raising this, we are looking into it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants