fix(ui): Stop UserProfile crashing after connecting the last Web3 wallet - #9900
Conversation
Connecting the last unconnected Web3 wallet strategy unmounted the whole UserProfile with "Rendered fewer hooks than expected". Once the wallet is verified, AddWeb3WalletActionMenu returns null before calling useReverification, so it calls fewer hooks than on the previous render. With a single enabled Web3 provider, this happened on every successful connect. Call useReverification before the early return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 7783b33 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: 6 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 8 reviews per hour. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Fixed issue severity: <fixed_issue_severity>Low</fixed_issue_severity> Merge Risk: ⚪ Minimal · up to The last-wallet connection fix has regression coverage, and no actionable issue remains before merge. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
API Changes Report
Summary
No API Changes DetectedAll packages have stable APIs with no detected changes. Report generated by Break Check Last ran on |
@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: |
| const createWeb3Wallet = useReverification((identifier: string) => | ||
| user?.createWeb3Wallet({ web3Wallet: identifier }), | ||
| ); |
Connecting the last unconnected Web3 wallet strategy unmounted the whole
UserProfilewith "Rendered fewer hooks than expected". Once the wallet is verified,AddWeb3WalletActionMenureturns null before callinguseReverification, so it calls fewer hooks than on the previous render. With a single enabled Web3 provider, this happened on every successful connect.Fix: Call
useReverificationbefore the early return.@f-westergren observed this live while testing a backend Web3 wallet fix. GIF demonstrating the bug before this fix:
Fix:
Description
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change