Repository navigation
fix(assets-controller): AccountsAPI call when non-EVM chain down in WS - #10585
Merged
Merged
Conversation
Kriys94
force-pushed
the
fix/UpdateNonEVMAssetsTx
branch
from
September 29, 2026 20:59
29304b0 to
957d62a
Compare
Kriys94
force-pushed
the
fix/UpdateNonEVMAssetsTx
branch
from
September 30, 2026 09:42
957d62a to
b14ff0f
Compare
| }), | ||
| ); | ||
|
|
||
| await flushPromises(); |
Contributor
There was a problem hiding this comment.
Disgusting 🤮
Not blocking but lets please not use flushPromises - it is an anti-pattern. Instead use waitFor
| }), | ||
| ); | ||
|
|
||
| await flushPromises(); |
Contributor
There was a problem hiding this comment.
Same here.. ideally want to be careful with these - they introduce flake, test confusion, etc.
| }); | ||
| }); | ||
|
|
||
| it('does not force refresh assets for a non-EVM transaction on an AccountActivity-active chain', async () => { |
Contributor
There was a problem hiding this comment.
Optional - we can do this later.
A lot of these cases could possibly be caught as a test table - this can help test readability (only need to look through table instead of whole test implementation).
Prithpal-Sooriya
previously approved these changes
Sep 30, 2026
Prithpal-Sooriya
left a comment
Contributor
There was a problem hiding this comment.
Approved with some test nits.
Prithpal-Sooriya
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
References
Checklist
Note
Medium Risk
Breaking messenger wiring is required for all consumers; incorrect delegation would silently skip non-EVM post-tx balance updates.
Overview
Non-EVM (Snap keyring) confirmed transactions now trigger the same post-tx balance refresh as EVM
TransactionController:transactionConfirmed: when AccountActivity is not active on that chain,AssetsControllerforce-callsgetAssetswithbypassServerCache: truefor the selected account on the transaction’s CAIP-2 chain.This adds a subscription to
MultichainTransactionsController:transactionConfirmed, a dependency on@metamask/multichain-transactions-controller, and refactors the EVM handler into#refreshAssetsForEVMTransaction/#refreshAssetsForNonEvmTransactionsharing#refreshAssetsAfterConfirmed(AccountActivity skip, account match, cache bypass).Breaking:
AssetsControllerMessengermust allow and delegateMultichainTransactionsController:transactionConfirmedonto the Assets messenger, or the handler never runs. Tests cover selected vs other accounts, AccountActivity up/down, and invalid chains.Reviewed by Cursor Bugbot for commit e4cb0e9. Bugbot is set up for automated code reviews on this repo. Configure here.