Skip to content

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

Merged
kuan121 merged 1 commit intoripple:mainfrom
manavukani:fix/tokens-table
Mar 24, 2026
Merged

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

Conversation

@manavukani
Copy link
Copy Markdown
Contributor

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
Copy Markdown
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!

@kuan121
Copy link
Copy Markdown
Contributor

kuan121 commented Mar 24, 2026

@manavukani Thanks for the contribution!

@kuan121 kuan121 merged commit bd7fc37 into ripple:main Mar 24, 2026
6 checks passed
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.

3 participants