[Frontend] Add identicon / initials fallback for unverified custom token icons
Overview
When a stream uses a newly deployed or custom SAC (Soroban Asset Contract) token without a pre-registered logo URL, the token icon renders as a broken image or empty circle.
Problem
- Broken
<img />icons look unprofessional and cause browser console 404 warnings.
Proposed Changes
- Build a fallback token avatar in
frontend/src/components/TokenAvatar.tsx. - If image fails to load (
onError), display a gradient circle with the first 2 letters of the token symbol.
Acceptance Criteria
- [ ] Broken or missing image URLs trigger fallback gracefully.
- [ ] Generates consistent deterministic background gradient based on token address.
- [ ] No broken image icon shown in browser.
@Simbabi has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
Hi maintainer, I'd like to work on this. I'd build TokenAvatar.tsx to render the actual icon
with an onError handler that swaps in a gradient circle showing the first two letters of the token symbol, with the gradient hue derived deterministically from the token's contract address (hashing it to a stable value) so the same token always gets the same color across sessions and renders. I'll make sure the fallback also covers a missing/empty icon URL up front, not just a failed load, so there's never a broken-image flash either way. Ready to get started.
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Simbabi to this issue.
@Nife-tanny has applied to work on this issue as part of the Stellar Wave Program's 9th wave.
Hi I would like to work on this issue
ℹ️ Repo Maintainers: To accept this application, review their application or assign @Nife-tanny to this issue.
Congratulations, @Nife-tanny! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.
🧑💻 @Nife-tanny: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.
[!WARNING] When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.
🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.
🌊 Happy Wave 🌊
This issue has been marked as completed by a Drips Wave moderator for @Nife-tanny as part of the Stellar Wave Program's 9th Wave 🥳
Moderator's reason: [Auto-assessed] The PR was successfully merged by the maintainer (mergedAt: 2026-10-09T07:03:39Z). The implementation fully addresses issue #1490 by introducing a robust TokenAvatar component with proper fallbacks, deterministic gradient generation, and full test coverage.
😎 @Nife-tanny: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here.
🧑💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.
ℹ️ Note: This issue was marked complete via moderation. Points were issued even though the GitHub issue remains open.