Walletconnect mobile support (react-wallet-kit)#1162
Open
amircheikh wants to merge 3 commits intomainfrom
Open
Walletconnect mobile support (react-wallet-kit)#1162amircheikh wants to merge 3 commits intomainfrom
amircheikh wants to merge 3 commits intomainfrom
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 9c74e78:
|
85ecf46 to
1434816
Compare
1434816 to
c5175f5
Compare
a32e5a3 to
9c74e78
Compare
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
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.
This PR adds the ability to connect mobile WalletConnect compatible wallets when the user opens the login modal on their phone.
Dear reviewer: please double check the TODO comments I left.
How it works
In
core, thefetchWalletConnectAppsfunction hits thehttps://explorer-api.walletconnect.com/v3/walletsendpoint to retrieve a list of all WalletConnect supported wallets. The developer's WalletConnect project id must be passed into the function.In
react-wallet-kit, a helperbuildWalletConnectProvidersfunction is exposed. Using a passedprojectIdThis function fetches the apps and builds them into a list ofWalletProviders. We prefer the type for these apps to be ourWalletProvidertype since we can reuse the same type for all our wallet connection UI components.The provider function
fetchAndBuildWalletConnectAppsis ran automatically if WalletConnect is enabled using theprojectIdpassed into theTurnkeyConfig. This function will runbuildWalletConnectProvidersand save the result to a new, exposed state variable,walletConnectApps.The UI components for wallet connecting and authentication are all expanded to support this new system.
On Desktop: clicking WalletConnect will take you to the QR code scanning screen. You can optionally see all the supported WalletConnect apps as well by clicking the button.
On Mobile: You'll usually be sent directly to the screen where you see all apps. Selecting one will open it if available and take you thru the connecting / signing flow.
Demo
Mobile:
ScreenRecording_01-12-2026_09-38-59_1.mov
Desktop (mostly the same as before):
534643410-49191e77-0173-4472-b7b7-651bc2dd3a7a.mov
Additional screenshots of each screen:
All app selection:

Open app:

Sign login request:

QR code scanning:

Trying to open mobile app on desktop:

How I Tested These Changes
Locally. Using tunneling service to test my phone.
Did you add a changeset?
Will after reviews
If updating one of our packages, you'll likely need to add a changeset to your PR. To do so, run
pnpm changeset.pnpm changesetwill generate a file where you should write a human friendly message about the changes. Note how this (example) includes the package name (should be auto added by the command) along with the type of semver change (major.minor.patch) (which you should set).These changes will be used at release time to determine what packages to publish and how to bump their version. For more context see this comment.