feat: serialize caipAddress on allAccounts#5535
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
10 Skipped Deployments
|
🦋 Changeset detectedLatest commit: 48c3485 The changes in this PR will be included in the next version bump. This PR includes changesets to release 25 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 |
Visual Regression Test Results ✅ PassedChromatic Build: https://www.chromatic.com/build?appId=6493191bf4b10fed8ca7353f&number=754 👉 Please review the visual changes in Chromatic and accept or reject them. |
There was a problem hiding this comment.
Pull request overview
This PR adds CAIP-10 (caipAddress) serialization to allAccounts across the React hook, Vue hook, and the base client getAccount() API, and fixes the Vue useAppKitAccount() hook to actually populate allAccounts.
Changes:
- Extend account-related types to optionally include
caipAddress(AccountTypeMapandConnection.accounts). - Thread
caipAddressthroughCoreHelperUtil.createAccount(...)and populate it when buildingallAccounts(React, Vue, base client). - Update Vue
useAppKitAccount()to computeallAccountsfromConnectionController.getConnections(...).
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/controllers/src/utils/TypeUtil.ts | Adds optional caipAddress to AccountTypeMap. |
| packages/controllers/src/utils/CoreHelperUtil.ts | Extends createAccount to accept/store optional caipAddress. |
| packages/controllers/exports/vue.ts | Populates allAccounts (and caipAddress) from controller connections in the Vue hook. |
| packages/controllers/exports/react.ts | Populates allAccounts[n].caipAddress when constructing accounts in the React hook. |
| packages/common/src/utils/TypeUtil.ts | Extends Connection.accounts[] type to optionally include caipAddress. |
| packages/appkit/src/client/appkit-base-client.ts | Populates allAccounts[n].caipAddress in getAccount(). |
| .changeset/rare-brooms-smell.md | Publishes patch bumps and notes CAIP address serialization change. |
💡 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 |
06ed44d to
890a8df
Compare
890a8df to
5430c38
Compare
5430c38 to
d22d4d8
Compare
7e19b1f to
97d64cb
Compare
Refactors createAccount to accept caipAddress as sole identity input, deriving namespace, address, and chainId from it via ParseUtil. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2f7539e to
7212184
Compare
7212184 to
48c3485
Compare
Summary
caipAddressfield toAccountTypeMapandConnection.accounts, constructed fromconnection.caipNetwork.caipNetworkId:address(CAIP-10 format)caipAddresson each account inallAccountsacross all 3 construction sites: React hook, Vue hook, and base clientgetAccount()useAppKitAccount()hook which previously never populatedallAccounts(always returned[])Test plan
pnpm buildpasses (all 23 packages)pnpm testpasses (246 test files, 3162 tests)pnpm run prettier:formatcleanallAccounts[n].caipAddressreturns correct CAIP-10 format in a connected wallet scenario🤖 Generated with Claude Code