fix: show fallback token icons in confirmation rows cp-7.78.0#30502
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. |
| } from '../../../../../component-library/components/Badges/Badge'; | ||
| import { getNetworkImageSource } from '../../../../../util/networks'; | ||
| import { useTokenWithBalance } from '../../hooks/tokens/useTokenWithBalance'; | ||
| import { getAssetImageUrl } from '../../../../UI/Bridge/hooks/useAssetMetadata/utils'; |
There was a problem hiding this comment.
Few other features are importing this as well from the Bridge feature. Ideally in some future PR this would be moved into a shared util library.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #30502 +/- ##
=======================================
Coverage 82.13% 82.14%
=======================================
Files 5488 5490 +2
Lines 147743 147790 +47
Branches 33969 33988 +19
=======================================
+ Hits 121353 121395 +42
- Misses 18084 18087 +3
- Partials 8306 8308 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2be0f2d to
8921cc4
Compare
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Both changes are purely UI/display improvements with no controller, state management, or core logic changes. The No other test tags are warranted:
The test files are unit tests only, confirming the scope is limited to the confirmations UI layer. Performance Test Selection: |
|



Description
Fixes missing token icons in confirmation rows when token metadata is unavailable in local token state. The confirmation
TokenIconnow falls back to the shared MetaMask token icon URL when it has an address, chain ID, and symbol, while still rendering nothing when neither token metadata nor a symbol is available.This also passes the receive token symbol from
PayWithRowintoTokenIcon, so Perps and Predict deposit/withdraw rows can render the token icon fallback for mUSD and other supported ERC-20 tokens with missing local metadata.Changelog
CHANGELOG entry: Show fallback token icons in confirmation rows
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1411
Manual testing steps
Screenshots/Recordings
Before
After
N/A
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Low risk UI change that only affects how token icons are resolved/rendered in confirmation rows. Main risk is incorrect fallback URL generation for some chains, but it’s covered by new unit tests.
Overview
Fixes missing token icons in confirmation flows by updating
TokenIconto accept an optionalsymboland, when local token metadata is absent, fall back to a MetaMask-hosted token icon URL (while still rendering nothing when neither metadata norsymbolis available).Updates
PayWithRowto pass the displayed tokensymbolintoTokenIcon(notably for Receive/withdraw rows), and expands unit tests to validate symbol propagation and fallback URL generation across multiple supported chains.Reviewed by Cursor Bugbot for commit 8921cc4. Bugbot is set up for automated code reviews on this repo. Configure here.