Repository navigation
feat(assets-controller): enrich native asset metadata from config registry - #11420
Draft
mikesposito wants to merge 2 commits into
Draft
mikesposito wants to merge 2 commits into
mikesposito wants to merge 2 commits into
Conversation
…istry RpcDataSource now reads the network config from ConfigRegistryController:getNetworkConfigByCaip2ChainId (already used for the multicall3 address) when emitting native asset metadata, preferring the registry's assets.native symbol, name, decimals and image over the chain status stub. Previously emitted imageless native stubs are upgraded with the registry image, without clobbering richer entries added by AccountsAPI.
mikesposito
force-pushed
the
fix/assets-controller-native-metadata-from-registry
branch
from
November 10, 2026 14:01
bd1faf0 to
2b51ecd
Compare
…-native-metadata-from-registry # Conflicts: # packages/assets-controller/CHANGELOG.md
Contributor
|
Nice one thanks. |
4 of 7 tasks
This branch has not been deployed
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
When
RpcDataSourceemits metadata for a chain's native asset, it builds a stub from network controller state only:symbolandnameboth default to the network ticker,decimalsis hardcoded to18, and there is no image. Native asset metadata from the config registry (assets.native: symbol, name, decimals, imageUrl) is never consumed, so registry-only chains (or chains whose native asset data was updated in the registry) show wrong or blank native asset details and logos downstream.#collectMetadataForBalancesnow callsConfigRegistryController:getNetworkConfigByCaip2ChainId(an action the data source already calls for the multicall3 address, already in the messenger allowlist) and prefers the registry'sassets.nativesymbol, name, decimals and image when emitting the native stub. It also re-emits when the registry provides an image for an existing native entry that has none, upgrading previously emitted stubs without clobbering richer entries (e.g. image/description added by AccountsAPI). The messenger action was already allowed and registered; consumers pick this up via a package version bump.References
N/A
Checklist