Skip to content

feat: connect all namespaces for auth connector#4888

Merged
tomiir merged 15 commits intomainfrom
enes/apkt-3045-multichain-the-embedded-wallet-of-different-chain-2
Aug 26, 2025
Merged

feat: connect all namespaces for auth connector#4888
tomiir merged 15 commits intomainfrom
enes/apkt-3045-multichain-the-embedded-wallet-of-different-chain-2

Conversation

@enesozturk
Copy link
Copy Markdown
Contributor

Description

Updates connectExternal method to handle Auth connections to be connected for all namespaces. When user connected with auth provider, we should sync all supported namespace's accounts to AppKit, like WC.

In this PR, iterates remaining (non active) Auth supported namespaces to call .connect and syncs account info for that namespace. Makes relevant changes to AppKit class and some controllers and adds e2e tests

Type of change

  • Chore (non-breaking change that addresses non-functional tasks, maintenance, or code quality improvements)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Associated Issues

For Linear issues: Closes APKT-xxx
For GH issues: closes #...

Showcase (Optional)

If there is a UI change include the screenshots with before and after state.
If new feature is being introduced, include the link to demo recording.

Checklist

  • Code in this PR is covered by automated tests (Unit tests, E2E tests)
  • My changes generate no new warnings
  • I have reviewed my own code
  • I have filled out all required sections
  • I have tested my changes on the preview link
  • Approver of this PR confirms that the changes are tested on the preview link

Copilot AI review requested due to automatic review settings August 22, 2025 07:48
@linear
Copy link
Copy Markdown

linear bot commented Aug 22, 2025

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Aug 22, 2025

⚠️ No Changeset found

Latest commit: fba65a7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Aug 22, 2025

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

Project Deployment Preview Comments Updated (UTC)
appkit-basic-html Ready Ready Preview Comment Aug 26, 2025 10:30am
appkit-demo Ready Ready Preview Comment Aug 26, 2025 10:30am
appkit-gallery Ready Ready Preview Comment Aug 26, 2025 10:30am
appkit-laboratory Ready Ready Preview Comment Aug 26, 2025 10:30am
10 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
appkit-basic-example Ignored Ignored Aug 26, 2025 10:30am
appkit-basic-sign-client-example Ignored Ignored Aug 26, 2025 10:30am
appkit-basic-up-example Ignored Ignored Aug 26, 2025 10:30am
appkit-ethers5-bera Ignored Ignored Aug 26, 2025 10:30am
appkit-nansen-demo Ignored Ignored Aug 26, 2025 10:30am
appkit-vue-solana Ignored Ignored Aug 26, 2025 10:30am
appkit-wagmi-cdn-example Ignored Ignored Aug 26, 2025 10:30am
ethereum-provider-wagmi-example Ignored Ignored Aug 26, 2025 10:30am
next-wagmi-solana-bitcoin-example Ignored Ignored Aug 26, 2025 10:30am
vue-wagmi-example Ignored Ignored Aug 26, 2025 10:30am

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR extends the Auth connector functionality to support multi-namespace connections, ensuring users connecting via auth providers (email/social) are automatically connected to all supported namespaces simultaneously, similar to WalletConnect behavior.

Key changes:

  • Refactored connectExternal method to handle multi-namespace auth connections
  • Added helper utilities for namespace management and chain ID parsing
  • Enhanced account synchronization logic for non-active namespaces

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/controllers/exports/index.ts Added wildcard export for ConnectionController types
packages/appkit/src/client/appkit.ts Updated auth provider connection logic to use proper namespace detection
packages/appkit/src/client/appkit-base-client.ts Major refactoring of connection logic with new multi-namespace support
packages/appkit-utils/src/HelpersUtil.ts Added utilities for chain namespace parsing and auth namespace filtering
packages/appkit-utils/tests/HelperUtil.test.ts Added comprehensive tests for new helper functions
apps/laboratory/tests/shared/validators/ModalValidator.ts Enhanced test validation for namespace-specific balance checking
apps/laboratory/tests/shared/utils/project.ts Added new test configuration for multichain email tests
apps/laboratory/tests/multichain/multichain-all.spec.ts Updated test assertions for namespace-specific balance validation
apps/laboratory/tests/multichain/multichain-all-email.spec.ts New comprehensive e2e tests for multi-namespace email auth
apps/laboratory/tests/multichain-extension.spec.ts Updated extension tests to handle multi-namespace scenarios

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/controllers/exports/index.ts Outdated
Comment thread packages/appkit/src/client/appkit-base-client.ts
Comment thread packages/appkit/src/client/appkit-base-client.ts Outdated
cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 22, 2025

Warnings
⚠️ Testing spec changed

Generated by 🚫 dangerJS against fba65a7

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Aug 22, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 78.31% 34774 / 44405
🔵 Statements 78.31% 34774 / 44405
🔵 Functions 76.16% 3829 / 5027
🔵 Branches 86.65% 8194 / 9456
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/appkit-utils/src/ErrorUtil.ts 95.74% 75% 42.85% 95.74% 42, 48, 54, 95
packages/appkit-utils/src/HelpersUtil.ts 92.42% 100% 83.33% 92.42% 90-96
packages/appkit/src/client/appkit-base-client.ts 71.84% 87.24% 75.55% 71.84% 184, 197-200, 203, 212-213, 282-283, 285-286, 291-292, 373-374, 410-416, 481-482, 508-509, 512-513, 555-556, 559, 600-604, 611-612, 615-616, 627-650, 659-660, 677-689, 693-714, 717-723, 726-732, 735-741, 744-750, 753-763, 766-772, 775-781, 801-810, 813-819, 822-823, 826-827, 846-847, 871-913, 920-932, 938-971, 974-984, 1036-1037, 1042, 1057-1073, 1087, 1091-1098, 1127-1128, 1165-1167, 1171-1184, 1189-1190, 1198-1199, 1201-1202, 1251-1260, 1305-1306, 1318-1319, 1324, 1347-1352, 1395, 1416-1417, 1427, 1429-1445, 1450, 1495-1496, 1509-1520, 1566-1579, 1624, 1630-1634, 1653-1654, 1673-1676, 1712-1731, 1754-1765, 1794-1795, 1801-1827, 2035-2036, 2068-2069, 2072-2073, 2086-2089, 2092-2093, 2113-2114, 2117-2118, 2130-2140, 2158-2159, 2162-2169, 2173-2174, 2188, 2196, 2199, 2203, 2208-2227, 2230-2239, 2246-2247, 2261-2262, 2265-2266, 2273-2274, 2313-2314, 2397-2398, 2401-2402, 2405-2408, 2411-2412, 2415-2416, 2419-2420, 2423-2424, 2427-2431, 2440-2449, 2458-2469, 1182-1258, 1761, 2210-2231
packages/appkit/src/client/appkit.ts 45.77% 78.09% 82.14% 45.77% 71-119, 122-136, 139-146, 149-165, 168-180, 185-195, 201-202, 227-228, 235-236, 249-295, 303-315, 317, 319-338, 340-354, 379-385, 401, 422-423, 428-429, 444-528, 567, 598-599, 622-624, 632-633, 668-669, 676-677, 680-683, 273-284
packages/controllers/exports/index.ts 100% 100% 100% 100%
packages/controllers/src/controllers/AlertController.ts 86.66% 100% 57.14% 86.66% 58-64
Generated in workflow #14558 for commit fba65a7 by the Vitest Coverage Report Action

cursor[bot]

This comment was marked as outdated.

Comment thread packages/appkit-utils/src/HelpersUtil.ts
Comment thread apps/laboratory/tests/email-after-farcaster.spec.ts
Copy link
Copy Markdown
Collaborator

@tomiir tomiir left a comment

Choose a reason for hiding this comment

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

the appkit-base-client chagnes are code formatting / nicer code but no functional changes right?

@tomiir tomiir disabled auto-merge August 26, 2025 10:55
@tomiir tomiir merged commit 628145c into main Aug 26, 2025
41 checks passed
@tomiir tomiir deleted the enes/apkt-3045-multichain-the-embedded-wallet-of-different-chain-2 branch August 26, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants