Skip to content

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

Open
@Montoya

Description

@Montoya

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

IMG_2510.MP4

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

Metadata

Metadata

Labels

Sev2-normalAn issue that may lead to users misunderstanding some limited risks they are takingregression-prod-7.39.0Regression bug that was found in production in release 7.39.0team-sdkSDK teamtype-bugSomething isn't working

Type

No type

Projects

Status

Fix in Progress

Status

Needs reproduction

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions