-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: reset token icon when source changes to recalculate fallback #24334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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. |
|
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThe changes modify two base UI components (RemoteImage and TokenIcon) that are widely used across the application. The changes are focused on fixing state management issues:
These are bug fixes that improve how images reload when their props change. The components are used in:
The changes are relatively low-risk as they:
Selected tags cover the main feature areas where these components are visually displayed and could be affected by the state management changes. |




Description
It was found that when the source of a TokenIcon instance changes to an error URI, the TokenIcon does not render the fallback avatar. This fix addresses it,
Changelog
CHANGELOG entry: reset token icon when source changes to recalculate fallback
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/SWAPS-3603
Manual testing steps
Screenshots/Recordings
Before
After
Screen.Recording.2025-12-18.at.12.22.50.PM.mov
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Ensures token icons properly re-render and fall back when image sources change or fail.
useEffectto resetshowFallbackwheniconorsymbolchanges; setskeyonRemoteImageto force remount on source change; updatesTextimport path; minor typing tweaks.onErrornow invokes providedonErrorcallback and internal error is reset whensource.urichanges; simplifies IPFS URL resolution error handling; preserves Identicon fallback whenaddressis provided.Written by Cursor Bugbot for commit eba878a. This will update automatically on new commits. Configure here.