metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

[Bug]: MetaMask Mobile not rejecting on wallet_getCapabilities unsupported method when connected via WalletConnect / inAppBrowser

Open Montoya opened this issue 1 year ago • 5 comments

Describe the bug

Reported by CoW Swap:

  1. Mobile browser
  2. Connect MetaMask mobile wallet via WalletConnect

As I mentioned above, we added EIP5792 support which implies using wallet_getCapabilities method. When we do the request, it switches the focus to MetaMask mobile app 🙁 As you can see on the video, when I change the buying token, it imidiately navigates me to MetaMask. We already deployed hotfix for this issue, and disabled EIP5792 for mobile browsers connected via WalletConnect. If you want to reproduce it, you can use this link: https://swap-qstbz5egv-cowswap.vercel.app/ The issue is also reproducible with iMToken wallet, but is not with Trust, just for your information. Thank you!

To clarify, wallet_getCapabilities request triggers switching focus to the wallet for some reason, but it should not.

Expected behavior

MetaMask returns an error on this method as unsupported

Screenshots/Recordings

https://github.com/user-attachments/assets/3ff019ac-fa26-4aab-9ce0-185ce95220c3

Steps to reproduce

  1. Open MetaMask Mobile inappbrowser
  2. Go to https://swap-qstbz5egv-cowswap.vercel.app/
  3. Connect MetaMask via WalletConnect
  4. Follow the steps in the attached video

Error messages or log output


Detection stage

In production (default)

Version

7.39.0

Build type

None

Device

Android

Operating system

Android

Additional context

No response

Severity

No response

Montoya avatar Feb 17 '25 17:02 Montoya

Update: this appears to be an issue with WalletConnect, not our API or SDK

Montoya avatar Feb 18 '25 19:02 Montoya

This appears to be an issue with how we configured namespaces with the 5792 methods but they methods are not supported yet

Montoya avatar Feb 19 '25 21:02 Montoya

This issue has been automatically marked as stale because it has not had recent activity in the last 90 days. It will be closed in 7 days. Thank you for your contributions.

github-actions[bot] avatar May 20 '25 21:05 github-actions[bot]

Issue exists in current version. Same repro steps

benjddy avatar Jun 03 '25 17:06 benjddy

I was not able to reproduce this issue. 7.47.0

kji304TS avatar Jun 09 '25 20:06 kji304TS