feat: expose WC relay clientId in useAppKitWallets - #5608
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: aaf150f The changes in this PR will be included in the next version bump. This PR includes changesets to release 26 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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
9 Skipped Deployments
|
Visual Regression Test Results ✅ PassedChromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=846 👉 Please review the visual changes in Chromatic and accept or reject them. |
There was a problem hiding this comment.
Pull request overview
Exposes the WalletConnect relay clientId (from BlockchainApiController.state) as a first-class field in the useAppKitWallets hook return value, including tests to validate the new behavior.
Changes:
- Add
clientId: string | nulltoUseAppKitWalletsReturnand return it fromuseAppKitWalletswhen headless is enabled (otherwisenull). - Subscribe to
BlockchainApiController.statewithin the hook to surfaceclientId. - Update/reactivate test mocks and add an assertion for a non-null
clientId.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/controllers/exports/react.ts | Adds clientId to the hook return type and returns it from BlockchainApiController.state (with null in non-headless early return). |
| packages/controllers/tests/hooks/react.test.ts | Updates hook tests to include clientId in mocked snapshots and asserts a non-null clientId value. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📦 Bundle Size Check✅ All bundles are within size limits 📊 View detailed bundle sizes> @reown/appkit-monorepo@1.7.1 size /home/runner/work/appkit/appkit > size-limit |
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
clientIdfromBlockchainApiController.stateas a first-class property in theuseAppKitWalletshook return typenullwhen headless mode is disabled, and the actualclientIdvalue when enabledclientIdassertionTest plan
pnpm buildpassespnpm lintpasses (no new warnings)pnpm run prettier:format— no changespnpm typecheckpassespnpm test -- packages/controllers/tests/hooks/react.test.ts— 45/45 tests pass🤖 Generated with Claude Code