-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
feat(TokenBalanceContoller): bump to 79.0.1 #21050
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
|
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:
|
8bc6386 to
0199b1f
Compare
|



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-controllerspackage (v79.0.0+) includes a TokenBalancesController that can optionally receive real-time balance updates via WebSocket events from@metamask/core-backendservices. Without updating the messenger allowlist inEngine.ts, the app would throw 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 definitionsEngine.tsfor TokenBalancesController initialization:AccountActivityService:balanceUpdated,AccountActivityService:statusChanged,BackendWebSocketService:connectionStateChangedTokenDetectionController:addDetectedTokensViaWsBumping the
@metamask/assets-controllersversion changes nothing about TokenBalancesController behavior. The controller will continue to work exactly as it does today using HTTP polling (180s interval).Why? The WebSocket integration requires
BackendWebSocketServiceandAccountActivityServiceto 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:
Manual testing steps
Screenshots/Recordings
N/A - Internal infrastructure change with no UI or behavioral changes. TokenBalancesController continues to use HTTP polling exactly as before.
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist