-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: move adapter blueprint to controllers #5129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: move adapter blueprint to controllers #5129
Conversation
…-chain-adapter-blueprint
…tor-chain-adapter-blueprint
🦋 Changeset detectedLatest commit: e2ab0c3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 24 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.
10 Skipped Deployments
|
Co-authored-by: Sven <38101365+svenvoskamp@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
…own-com/appkit into feat/refactor-chain-adapter-blueprint
9019e91
into
chore/remove-network-controller-client
Description
🔄 Refactor: Move ChainAdapterBlueprint to Controllers Package
Overview
This PR refactors the adapter architecture by relocating
ChainAdapterBlueprintfrom individual adapter packages to the@reown/appkit-controllerspackage, making it centrally available for use byAdapterController. This change eliminates the need for a centralizedconnectionManagerand simplifies adapter implementations while improving error handling and resolving circular dependencies.🎯 Key Changes
Architecture Improvements
ChainAdapterBlueprintfrom adapter packages topackages/controllers/src/controllers/AdapterController/ChainAdapterBlueprint.tsconnectionManager- each adapter now implementssyncConnectionsindependentlyChainAdapterBlueprintintoAdapterControllerfor centralized adapter managementEnhanced Error Handling
ErrorUtil.isUserRejectedRequestError()to handle multiple error codes:USER_REJECTED_REQUEST(4001)USER_REJECTED_METHODS(5002)USER_REJECTED(5000) - newly addedWcHelpersUtil.isUserRejectedRequestError()for WalletConnect-specific error codesAdapter Simplifications
syncConnectionsdirectly using their respective controllers and clientsUpdated Components
WalletConnectConnector,ChainController,OptionsController,ProviderController,WalletConnectUtilappkit-base-client,appkit-core, universal adapter client, and utilities (BalanceUtil,ConstantsUtil)w3m-connecting-wc-view)Dependency Management
workspace:*notation🏗️ Technical Benefits
🔧 Implementation Details
Before: Adapters relied on a shared
connectionManagerwith complex prop drillingAfter: Each adapter implements
syncConnectionsdirectlyError Handling Enhancement:
🐛 Bug Fixes & Improvements
📋 Migration Impact
🧪 Testing
syncConnectionsimplementations🚀 Deployment
This refactoring sets the foundation for more maintainable adapter development while preserving all existing functionality, improving error handling, and establishing a cleaner architecture for the AppKit SDK.
Type of change
Checklist
Note
Centralizes
ChainAdapterBlueprintin controllers, refactors adapters to implementsyncConnections, and improves user-rejection error handling across SDK with aligned tests and exports.ChainAdapterBlueprinttopackages/controllers/src/controllers/AdapterController/ChainAdapterBlueprint.tsand integrate withAdapterController.ChainController,OptionsController,ProviderController,WalletConnectConnector, andWalletConnectUtilfor new adapter flow.bitcoin,ethers,ethers5,solana, andwagmiclients/connectors to implementsyncConnectionsdirectly; remove centralized connection manager patterns.ErrorUtiland add WalletConnect-specific helpers; standardize messages/events.appkit-base-client,appkit-core, universal adapter client, and utilities with new blueprint and connection model; update exports.syncConnectionsand rejection cases..github/workflows/release-publish.yml; refresh changelogs.Written by Cursor Bugbot for commit e2ab0c3. This will update automatically on new commits. Configure here.