You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(multichain-network-controller): batch requests for active networks (#5752)
## Explanation
This PR implements request batching for the Network Activity API to
accommodate a new limitation imposed by the API platform team. The API
endpoint now caps requests at 20 account IDs per call to prevent URL
length limitations in some browsers.
### Key Changes
- Modified `MultichainNetworkService` to handle batching of account IDs
in groups of 20
- Added internal batch processing logic to maintain the same public
interface
- Updated tests to validate correct batching behavior
## References
Related to
[#4469](MetaMask/MetaMask-planning#4469)
## Changelog
NA
## 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 communicated my changes to consumers by [updating changelogs
for packages I've
changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs),
highlighting breaking changes as necessary
- [x] I've prepared draft pull requests for clients and consumer
packages to resolve any breaking changes
Copy file name to clipboardExpand all lines: packages/multichain-network-controller/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
19
### Changed
20
20
21
21
- Updated to restrict `getNetworksWithTransactionActivityByAccounts` to EVM networks only while non-EVM network endpoint support is being completed. Full multi-chain support will be restored in the coming weeks ([#5677](https://github.com/MetaMask/core/pull/5677))
22
+
- Updated network activity API requests to have batching support to handle URL length limitations, allowing the controller to fetch network activity for any number of accounts ([#5752](https://github.com/MetaMask/core/pull/5752))
0 commit comments