Skip to content

Connection to MetaMask via WalletConnect on mobile doesn't prompt to switch network #5

@php4fan

Description

@php4fan

I have modified sample.js only to not set the infura ID and to use the BSC mainnet:

diff YOUR/sample.js MY/sample.js
2c2
< KV.set_infuraID(YOUR_INFURA_ID);
---
> //KV.set_infuraID(YOUR_INFURA_ID);
3a4
> 
10c11
<     web3network: KV.rpc_codes.ETH_MAINNET
---
>     web3network: KV.rpc_codes.BSC_MAINNET

On an android phone with MetaMask installed:

  1. make sure I don't have the BSC network currently selected in MetaMask
  2. open the demo in Chrome
  3. click on the Connect button
  4. proceed to connect via WalletConnect and choose MetaMask as the app to open

Expected: MetaMask should prompt me to confirm switching to the BSC network

Observed: MetaMask only prompts me to connect, but remains on whatever network I'm currently in. The demo page is then happy and reported I'm connected.

(note: I have the BSC network configured in MetaMask, and I have accounts on it).

Compare this to:

  • on desktop Chrome, open the demo and choose to connect directly to MetaMask (the browser extension, without using WalletConnect)
  • in this case behaves as expected. MetaMask asks me for confirmation to switch to the BSC network

Not entirely sure if this could be a bug in MetaMask, WalletConnect or your demo. Usually the topmost element in the stack is the suspect unless proven otherwise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions