-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
chore: upgrade multichain-networks-controllers-v0.7.0 #14348
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
Conversation
…m the multichain networks controller and added the relevant state updates for mocks/fixtures
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
…4469-networks-with-activity
…4469-networks-with-activity
## Explanation Currently, our client manually adds networks and checks user activity one network at a time. This is inefficient and doesn't scale well. This PR introduces a more efficient approach by: 1. Adding a new API integration that fetches active networks for multiple accounts in a single request 2. Managing network activity state through the controller 3. Adding type-safe methods to handle both EVM and non-EVM accounts 4. Extracting network fetching logic into a dedicated service layer Key additions: - `getNetworksWithTransactionActivityByAccounts`: Fetches active networks for accounts - `MultichainNetworkService`: New service layer handling network activity fetching - Enhanced state management for network configurations and activity - Improved error handling and fallback mechanisms The new implementation: - Reduces API calls through batch fetching - Improves separation of concerns with dedicated service layer - Enhances type safety and error handling - Provides better state management with fallbacks PRs for Client Integration [Extension](MetaMask/metamask-extension#31414) [Mobile](MetaMask/metamask-mobile#14348) ## References Related to [#4469 ](MetaMask/MetaMask-planning#4469) ## Changelog <!-- If you're making any consumer-facing changes, list those changes here as if you were updating a changelog, using the template below as a guide. (CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or FIXED. For security-related issues, follow the Security Advisory process.) Please take care to name the exact pieces of the API you've added or changed (e.g. types, interfaces, functions, or methods). If there are any breaking changes, make sure to offer a solution for consumers to follow once they upgrade to the changes. Finally, if you're only making changes to development scripts or tests, you may replace the template below with "None". --> ### `@metamask/multichain-network-controller` - **ADDED**: New method `getNetworksWithTransactionActivityByAccounts` to fetch active networks for accounts - **ADDED**: New `MultichainNetworkServiceController` for handling network activity fetching - **ADDED**: New types for network activity state and responses - **CHANGED**: Enhanced error handling for network requests - **CHANGED**: Improved type safety for messenger actions - **CHANGED**: Updated state management for network activity ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes --------- Co-authored-by: Charly Chevalier <[email protected]>
…4469-networks-with-activity
…k service and update relevant tests
## Explanation Currently, our client manually adds networks and checks user activity one network at a time. This is inefficient and doesn't scale well. This PR introduces a more efficient approach by: 1. Adding a new API integration that fetches active networks for multiple accounts in a single request 2. Managing network activity state through the controller 3. Adding type-safe methods to handle both EVM and non-EVM accounts 4. Extracting network fetching logic into a dedicated service layer Key additions: - `getNetworksWithTransactionActivityByAccounts`: Fetches active networks for accounts - `MultichainNetworkService`: New service layer handling network activity fetching - Enhanced state management for network configurations and activity - Improved error handling and fallback mechanisms The new implementation: - Reduces API calls through batch fetching - Improves separation of concerns with dedicated service layer - Enhances type safety and error handling - Provides better state management with fallbacks PRs for Client Integration [Extension](MetaMask/metamask-extension#31414) [Mobile](MetaMask/metamask-mobile#14348) ## References Related to [#4469 ](MetaMask/MetaMask-planning#4469) ## Changelog <!-- If you're making any consumer-facing changes, list those changes here as if you were updating a changelog, using the template below as a guide. (CATEGORY is one of BREAKING, ADDED, CHANGED, DEPRECATED, REMOVED, or FIXED. For security-related issues, follow the Security Advisory process.) Please take care to name the exact pieces of the API you've added or changed (e.g. types, interfaces, functions, or methods). If there are any breaking changes, make sure to offer a solution for consumers to follow once they upgrade to the changes. Finally, if you're only making changes to development scripts or tests, you may replace the template below with "None". --> ### `@metamask/multichain-network-controller` - **ADDED**: New method `getNetworksWithTransactionActivityByAccounts` to fetch active networks for accounts - **ADDED**: New `MultichainNetworkServiceController` for handling network activity fetching - **ADDED**: New types for network activity state and responses - **CHANGED**: Enhanced error handling for network requests - **CHANGED**: Improved type safety for messenger actions - **CHANGED**: Updated state management for network activity ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes --------- Co-authored-by: Charly Chevalier <[email protected]>
…4469-networks-with-activity
…4469-networks-with-activity
…k/metamask-mobile into feat-4469-networks-with-activity
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from platform side
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
|
Description
This PR updates the multichain network controller and its relevant state
Related issues
Related to #4469
Manual testing steps
Screenshots/Recordings
NA
Before
NA
After
NA
Pre-merge author checklist
Pre-merge reviewer checklist