fix(assets-controller): fetch metadata for balances missing assetsInfo#9547
Open
salimtb wants to merge 5 commits into
Open
fix(assets-controller): fetch metadata for balances missing assetsInfo#9547salimtb wants to merge 5 commits into
salimtb wants to merge 5 commits into
Conversation
DetectionMiddleware only queues brand-new assets, so already-tracked balances without metadata never got enriched and stayed invisible in clients.
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.
DetectionMiddleware only queues brand-new assets, so already-tracked balances without metadata never got enriched and stayed invisible in clients.
Explanation
References
Checklist
Note
Low Risk
Scoped enrichment and network-list changes in the assets pipeline; no auth or breaking API changes, with regression coverage for the balance-only metadata path.
Overview
Token metadata enrichment now covers tokens that already appear in
assetsBalancebut lackassetsInfo(or an image), not only assets queued viadetectedAssets. That closes a gap where tracked balances could stay invisible in clients because detection middleware only queues brand-new assets.TokenDataSourcemiddleware walksresponse.assetsBalancewith the same skip rules as detection (existing image in response/state, staking contracts) and batches those asset IDs into the existing Tokens API v3 fetch.Robinhood Chain (
4663/0x1237) is added toSUPPORTED_NETWORKS_ACCOUNTS_API_V4in@metamask/assets-controllersso balances and token detection use the Accounts API instead of RPC-only paths.Reviewed by Cursor Bugbot for commit f7e9195. Bugbot is set up for automated code reviews on this repo. Configure here.