[Bug]: MetaMask Mobile not rejecting on wallet_getCapabilities unsupported method when connected via WalletConnect / inAppBrowser
Describe the bug
Reported by CoW Swap:
- Mobile browser
- 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
- Open MetaMask Mobile inappbrowser
- Go to https://swap-qstbz5egv-cowswap.vercel.app/
- Connect MetaMask via WalletConnect
- 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
Update: this appears to be an issue with WalletConnect, not our API or SDK
This appears to be an issue with how we configured namespaces with the 5792 methods but they methods are not supported yet
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.
Issue exists in current version. Same repro steps
I was not able to reproduce this issue. 7.47.0