fix(ui): list Solana wallets through the Wallet Standard - #9994
Conversation
The Solana wallet buttons used @solana/wallet-adapter-react only to list installed wallets. Signing already goes through @wallet-standard/core in @clerk/shared, so read the list from the same registry and drop the adapter packages. They pulled React Native, Metro, and @solana/web3.js into every @clerk/ui install. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Team Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. 7 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour. 📝 WalkthroughWalkthroughThe Solana wallet picker now uses the Wallet Standard registry instead of wallet-adapter providers. It displays registered wallets that support a Solana chain, connection, and message signing. The picker updates its list when wallets register or unregister. The change also updates package dependencies, removes the provider wrapper, and adds tests for filtering, registry updates, and wallet selection. Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~12 minutes Merge Risk: ⚪ Minimal · up to The wallet discovery migration preserves the sign-in selection contract. No merge-blocking issue remains, subject to normal build and test checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Comment |
🦋 Changeset detectedLatest commit: 4b8da39 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
clerk-js never imports them. @clerk/shared's Solana code only type-imports @solana/wallet-standard and lazy-loads @wallet-standard/core at runtime, which stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign-in calls standard:connect before signing, so a wallet without it could be listed but never finish. Also drops the new code comments and rewrites the changeset for people upgrading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
API Changes Report
Summary
🔴 Breaking changes index (1)Every breaking change, up front. Full diffs are in the package sections below.
@clerk/uiCurrent version: 1.37.0 Subpath
|
|
The |
tmilewski
left a comment
There was a problem hiding this comment.
There doesn't appear to be any downstream effects to Chrome Extensions (re: Remotely Hosted Code)
|
Tested on this branch's clerk-js sandbox preview in Chrome with Phantom:
I also resolved a downstream app's lockfile against the pkg.pr.new build of |
Description
@clerk/uidepended on@solana/wallet-adapter-reactonly to list the Solana wallets installed in the browser. That package depends on@solana-mobile/wallet-adapter-mobile, whose peers arereact-nativeand@solana/web3.js, so every app that installs@clerk/uialso installs React Native, Metro, and web3.js'sjaysonRPC client. That brings Dependabot alerts into consuming apps that they can't fix themselves (image-sizevia Metro;stream-jsonanduuidviajayson).Signing already skips the adapter:
getInjectedWeb3SolanaProvidersin@clerk/sharedfinds the wallet through@wallet-standard/core'sgetWallets(). This PR builds the button list from that same registry and drops the three@solana/*dependencies from@clerk/uiin favor of@wallet-standard/core. A wallet is listed when it supports asolana:chain,standard:connect, andsolana:signMessage, which are the features sign-in calls.ConnectionProviderandWalletProviderwrappers go away. Nothing used the RPC connection.web3-solana-wallet-buttonschunk drops from about 306 KB to 2 KB.@wallet-standard/corewas already inui-commonthrough@clerk/shared, so that chunk doesn't grow.@clerk/sharedcan't find that wallet in the Wallet Standard registry, so the button couldn't complete a sign-in. The list now shows only wallets that can.@clerk/clerk-jsalso drops the three@solana/*packages, which it listed but never imported.@clerk/shared's Solana code only type-imports@solana/wallet-standardand lazy-loads@wallet-standard/coreat runtime, which stays.To try it, enable Solana on a development instance's Web3 page and install a Solana wallet extension such as Phantom (signing needs no funds). Choosing Solana on
<SignIn />lists the installed wallets and signs in with the chosen one; without an extension, it shows the "No Solana Web3 wallets detected" message. Adding a Solana wallet in<UserProfile />renders the same list.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code