Repository navigation
feat(wallet): add asset metadata registry and icon display (#1721) - #1838
Merged
github-actions[bot] merged 3 commits intoOct 19, 2026
Merged
github-actions[bot] merged 3 commits into
github-actions[bot] merged 3 commits into
Conversation
…17#1721) Resolve and display asset metadata and icons for on-chain assets. - Add assetMetadataService with a static registry of 18 known assets (XLM, USDC, ETH, BTC, MATIC, ARB, OP, SOL, AVAX, BNB, LINK, UNI, DAI, WBTC, ATOM, DOT, ADA, LTC) including logoURI, name, and brand colour for each - Two-layer cache (L1 in-memory + L2 AsyncStorage) via CacheService with 24-hour TTL and tag-based bulk invalidation - Deterministic fallback for unknown assets: pickFallbackColor hashes the symbol to a palette of 8 accessible colours; deriveInitials produces a 1-3 char badge — guarantees graceful display for any token - Add useAssetMetadata hook: synchronous fast-path seeds the initial render from the static registry; async resolve fills the cache on subsequent calls; stable refresh() callback for manual re-resolve - Add AssetIcon component: expo-image with blurhash placeholder for known logos; coloured initials badge fallback; skeleton while loading; supports logoURIOverride for TokenBalance.logoURI passthrough - 45 passing tests covering registry lookup, cache read/write/ invalidation, fallback determinism, symbol normalisation Closes Smartdevs17#1721
|
@Clement-coder Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This branch was successfully 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.
Summary
Resolves #1721. Assets previously rendered as raw ticker codes. This PR adds a full metadata + icon pipeline so every asset displays its name, logo, and a graceful fallback.
Changes
src/services/assetMetadataService.tsname,logoURI, and brandfallbackColorresolveAssetMetadata(symbol)— async, never throws; checks L1/L2 cache first, then registry, then fallbackgetAssetMetadataSync(symbol)— synchronous fast-path for initial render seedingpickFallbackColor(symbol)— deterministic hash → 8-colour accessible palettederiveInitials(symbol)— 1–3 char abbreviationCacheService; tag-based bulk invalidation viainvalidateAllAssetMetadata()src/hooks/useAssetMetadata.tsinFlightRefrefresh()callback{ metadata, isLoading, isKnown, refresh }src/components/wallet/AssetIcon.tsxexpo-imagewith blurhash placeholder for logoslogoURIOverrideforTokenBalance.logoURIpassthroughaccessibilityLabel)Acceptance criteria
CacheService)Test output