-
Notifications
You must be signed in to change notification settings - Fork 4
feat(walletconnect): provide wallet capabilities within session data #262
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 task
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 1, 2025
### Description Implement support for `wallet_getCapabilities` request (EIP-5792) through WalletConnect. EIP-5792: * https://eips.ethereum.org/EIPS/eip-5792#wallet_getcapabilities * https://www.eip5792.xyz/reference/getCapabilities ### Note on mobile UX Whenever a dapp sends a WalletConnect request, the user must open their wallet app to respond. The mobile app can’t process the request quietly in the background. This means the user has to do an extra app switch, which adds friction to the experience (see video below). For instance, when using `useCapabilities` together with a WalletConnect provider, as soon as the connection succeeds, `useCapabilities` will automatically request the wallet’s capabilities. That triggers another deep link into the wallet without any explanation to the user. From their perspective, it might feel like the app is bouncing them around for no clear reason, even like a bug. To mitigate this, WalletConnect recommends sending the supported capabilities within session data. They will be cached, and no extra action from the user will be required. It will be addressed separately: * #262 https://github.com/user-attachments/assets/473a6915-fc72-450c-8843-593a501718a5 ### Test plan * Tested manually using https://bakoushin.github.io/wallet-connect-tester/ * Updated unit test ### Related issues - Part of ENG-644 ### Backwards compatibility Y ### Network scalability If a new NetworkId and/or Network are added in the future, the changes in this PR will: - [x] Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)
1 task
jophish
approved these changes
Oct 1, 2025
Contributor
jophish
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic -- tested out with a simulator against the tester site and worked well
kathaypacific
approved these changes
Oct 1, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Send wallet capabilities within the session data to avoid an extra
wallet_getCapabilitiesrequest that would otherwise require an extra user interaction.By including capabilities directly in the session, WalletConnect can respond to
wallet_getCapabilitieswithout prompting the user to switch to their wallet. This makes capability extraction seamless and improves the overall UX.WalletConnect capabilities support
WalletConnect currently supports two approaches for including capabilities in session data:
sessionPropertiesorscopedProperties. Docscapabilitiesprop insidesessionProperties. SourceWe do support both approaches for maximal compatibility.
Notes
chainIdsarray is omitted inwallet_getCapabilitiesrequest.fix: derive capabilities from session namespaces when chainIds is omitted WalletConnect/walletconnect-monorepo#6955
Test plan
Simulator.Screen.Recording.-.iPhone.17.Pro.Max.-.2025-10-01.at.14.35.21.mov
Related issues
Backwards compatibility
Y
Network scalability
If a new NetworkId and/or Network are added in the future, the changes in this PR will: