Skip to content

feat: expose WC relay clientId in useAppKitWallets - #5608

Merged
tomiir merged 3 commits into
mainfrom
tomiir/wc-client-id-exposure
Mar 31, 2026
Merged

feat: expose WC relay clientId in useAppKitWallets#5608
tomiir merged 3 commits into
mainfrom
tomiir/wc-client-id-exposure

Conversation

@tomiir

@tomiir tomiir commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Exposes the WalletConnect relay clientId from BlockchainApiController.state as a first-class property in the useAppKitWallets hook return type
  • Returns null when headless mode is disabled, and the actual clientId value when enabled
  • Adds test coverage including a non-null clientId assertion

Test plan

  • pnpm build passes
  • pnpm lint passes (no new warnings)
  • pnpm run prettier:format — no changes
  • pnpm typecheck passes
  • pnpm test -- packages/controllers/tests/hooks/react.test.ts — 45/45 tests pass

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 30, 2026 13:32
@changeset-bot

changeset-bot Bot commented Mar 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aaf150f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
@reown/appkit-controllers Patch
@reown/appkit-adapter-bitcoin Patch
@reown/appkit-adapter-ethers Patch
@reown/appkit-adapter-ethers5 Patch
@reown/appkit-adapter-solana Patch
@reown/appkit-adapter-ton Patch
@reown/appkit-adapter-tron Patch
@reown/appkit-adapter-wagmi Patch
@reown/appkit Patch
@reown/appkit-ui Patch
@reown/appkit-core Patch
@reown/appkit-utils Patch
@reown/appkit-scaffold-ui Patch
@reown/appkit-siwe Patch
@reown/appkit-siwx Patch
@reown/appkit-wallet-button Patch
@reown/appkit-experimental Patch
@reown/appkit-pay Patch
@reown/appkit-cdn Patch
@reown/appkit-universal-connector Patch
@reown/appkit-testing Patch
@reown/appkit-common Patch
@reown/appkit-polyfills Patch
@reown/appkit-wallet Patch
@reown/appkit-cli Patch
@reown/appkit-codemod Patch

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

@vercel

vercel Bot commented Mar 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
appkit-demo Ready Ready Preview, Comment Mar 30, 2026 1:52pm
appkit-gallery Ready Ready Preview, Comment Mar 30, 2026 1:52pm
appkit-headless-sample-app Ready Ready Preview, Comment Mar 30, 2026 1:52pm
appkit-laboratory Ready Ready Preview, Comment Mar 30, 2026 1:52pm
9 Skipped Deployments
Project Deployment Actions Updated (UTC)
appkit-basic-example Ignored Ignored Mar 30, 2026 1:52pm
appkit-basic-sign-client-example Ignored Ignored Mar 30, 2026 1:52pm
appkit-basic-up-example Ignored Ignored Mar 30, 2026 1:52pm
appkit-ethers5-bera Ignored Ignored Mar 30, 2026 1:52pm
appkit-nansen-demo Ignored Ignored Mar 30, 2026 1:52pm
appkit-wagmi-cdn-example Ignored Ignored Mar 30, 2026 1:52pm
ethereum-provider-wagmi-example Ignored Ignored Mar 30, 2026 1:52pm
next-wagmi-solana-bitcoin-example Ignored Ignored Mar 30, 2026 1:52pm
vue-wagmi-example Ignored Ignored Mar 30, 2026 1:52pm

Request Review

@github-actions

github-actions Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Visual Regression Test Results ✅ Passed

⚠️ 15 visual change(s) detected

Chromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=846
Storybook Preview: https://6493191bf4b10fed8ca7353f-sdunswtiaw.chromatic.com/

👉 Please review the visual changes in Chromatic and accept or reject them.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 | null to UseAppKitWalletsReturn and return it from useAppKitWallets when headless is enabled (otherwise null).
  • Subscribe to BlockchainApiController.state within the hook to surface clientId.
  • 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.

Comment thread packages/controllers/exports/react.ts
@github-actions

github-actions Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

📦 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

@reown/appkit - Main Entry
Size limit:   80 kB
Size:         75.72 kB with all dependencies, minified and gzipped
Loading time: 1.5 s    on slow 3G
Running time: 228 ms   on Snapdragon 410
Total time:   1.8 s
@reown/appkit/react
Size limit:   235 kB
Size:         234.88 kB with all dependencies, minified and gzipped
Loading time: 4.6 s     on slow 3G
Running time: 718 ms    on Snapdragon 410
Total time:   5.4 s
@reown/appkit/vue
Size limit:   80 kB
Size:         75.72 kB with all dependencies, minified and gzipped
Loading time: 1.5 s    on slow 3G
Running time: 275 ms   on Snapdragon 410
Total time:   1.8 s
@reown/appkit-scaffold-ui
Size limit:   220 kB
Size:         214.17 kB with all dependencies, minified and gzipped
Loading time: 4.2 s     on slow 3G
Running time: 373 ms    on Snapdragon 410
Total time:   4.6 s
@reown/appkit-ui
Size limit:   500 kB
Size:         13.16 kB with all dependencies, minified and gzipped
Loading time: 258 ms   on slow 3G
Running time: 100 ms   on Snapdragon 410
Total time:   357 ms

@github-actions

github-actions Bot commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.47% 39720 / 50613
🔵 Statements 78.47% 39720 / 50613
🔵 Functions 76.27% 4254 / 5577
🔵 Branches 86.71% 9663 / 11144
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/controllers/exports/react.ts 76.06% 87.64% 50% 76.06% 71-80, 106-114, 131, 154, 555, 557-565, 582-583, 72-75, 87-89, 104-151, 167, 172-217, 229-304, 432-609
Generated in workflow #17023 for commit aaf150f by the Vitest Coverage Report Action

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants