-
Notifications
You must be signed in to change notification settings - Fork 30
asset: Implement fallback logic for missing token icons #67
Copy link
Copy link
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Description
When we list new or unknown tokens, we might not have a custom logo image for them yet.
Right now, missing images show an ugly broken image icon in the browser.
We need a fallback mechanism that generates a clean initial-based logo if the image fails to load.
Requirements
- Update the
TokenIcon.tsxcomponent. - Use the
onErrorattribute on the HTML<img>tag to detect loading failures. - If the image fails, swap the UI to a colored circle (
div). - Display the first letter of the token symbol inside the circle (e.g., "U" for UnknownToken).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program