Skip to content

Fixes Issue #1285 (Icons out of sync on Tokens page)#1301

Open
manavukani wants to merge 1 commit intoripple:mainfrom
manavukani:fix/tokens-table
Open

Fixes Issue #1285 (Icons out of sync on Tokens page)#1301
manavukani wants to merge 1 commit intoripple:mainfrom
manavukani:fix/tokens-table

Conversation

@manavukani
Copy link

High Level Overview of Change

Add a unique key prop to elements in the Tokens table to fix icon mismatches after re-sorting.

Context of Change

Bug: On the Tokens page, when filtering by a category (eg: Stablecoin) and then sorting by market cap multiple times, tokens display incorrect icons. For example, RLUSD would have the highest market cap but show another token's icon.

Root cause: The elements rendered via tokens.map(renderToken) had no key prop. Adding a key of currency.issuer_account (unique per token) ensures React correctly tracks each row for sorting.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Tests (You added tests for code that already exists, or your new feature included in this PR)
  • Documentation Updates
  • Translation Updates
  • Release

Codebase Modernization

  • Updated files to React Hooks
  • Updated files to TypeScript

Before / After

Before After
image image

Test Plan

@manavukani manavukani changed the title Fixes #1285 (Icons out of sync on Tokens page) Fixes ripple/explorer#1285 (Icons out of sync on Tokens page) Mar 22, 2026
@manavukani manavukani changed the title Fixes ripple/explorer#1285 (Icons out of sync on Tokens page) Fixes Issue #1285 (Icons out of sync on Tokens page) Mar 22, 2026
Copy link
Contributor

@Patel-Raj11 Patel-Raj11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants