Skip to content

asset: Implement fallback logic for missing token icons #67

@AlAfiz

Description

@AlAfiz

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.tsx component.
  • Use the onError attribute 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).

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions