-
Notifications
You must be signed in to change notification settings - Fork 5.4k
feat(TokenBalanceContoller): bump to 79.0.1 #36782
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
base: main
Are you sure you want to change the base?
Conversation
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. |
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Caution MetaMask internal reviewing guidelines:
|
Description
This PR adds messenger allowlist support for the TokenBalancesController WebSocket integration introduced in MetaMask/core#6784.
What is the reason for the change?
The updated
@metamask/assets-controllers
package (v79.0.0+) includes a TokenBalancesController that can optionally receive real-time balance updates via WebSocket events from@metamask/core-backend
services. Without updating the messenger allowlist, the extension throws an error:Event missing from allow list: AccountActivityService:balanceUpdated
.What is the improvement/solution?
This PR makes minimal changes to support the new TokenBalancesController capabilities:
@metamask/core-backend
(^1.0.1) for TypeScript type definitionstoken-balances-controller-messenger.ts
:AccountActivityService:balanceUpdated
,AccountActivityService:statusChanged
,BackendWebSocketService:connectionStateChanged
TokenDetectionController:addDetectedTokensViaWs
Bumping the
@metamask/assets-controllers
version changes nothing about TokenBalancesController behavior. The controller will continue to work exactly as it does today using HTTP polling.Why? The WebSocket integration requires
BackendWebSocketService
andAccountActivityService
to be initialized and connected. Since these services are not initialized in this PR, no WebSocket connection is established, and no real-time events are triggered. The TokenBalancesController gracefully detects their absence and continues using the existing HTTP polling mechanism.This PR only updates the messenger allowlist to prevent validation errors when the controller checks for the optional WebSocket events.
Benefits:
Changelog
CHANGELOG entry: null
Related issues
Fixes: #[issue number if applicable]
Related:
Note
Expands
TokenBalancesController
messenger allowlist for WebSocket integration, adds@metamask/core-backend
types, and bumps@metamask/assets-controllers
to79.0.1-preview
.AccountActivityService:balanceUpdated
,AccountActivityService:statusChanged
,BackendWebSocketService:connectionStateChanged
.TokenDetectionController:addDetectedTokensViaWs
.@metamask/core-backend
(^1.0.1).@metamask/assets-controllers
to79.0.1-preview
(via resolutions).Written by Cursor Bugbot for commit 0b6881b. This will update automatically on new commits. Configure here.