bug: Swap page shows contract addresses instead of token symbols #4

Closed
opened 2026-03-12 02:41:24 +00:00 by Brouie · 9 comments
Brouie commented 2026-03-12 02:41:24 +00:00 (Migrated from gitlab.com)

Trading pair and token fields show raw contract addresses instead of human-readable symbols (TSTA/TSTB). Token symbols should be resolved from token_info query.

Trading pair and token fields show raw contract addresses instead of human-readable symbols (TSTA/TSTB). Token symbols should be resolved from token_info query.
Brouie commented 2026-03-12 03:25:07 +00:00 (Migrated from gitlab.com)

mentioned in issue #1

mentioned in issue #1
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-03-12 07:00:21 +00:00
PlasticDigits commented 2026-03-12 07:00:32 +00:00 (Migrated from gitlab.com)

Fix pushed in commit c56e171.

What changed:

  • New tokenRegistry.ts — static lookup table built from tokenlist/tokenlist.json mapping all 7 known tokens (LUNC, USTC, CL8Y, USTR, ALPHA, USTRIX, SpaceUSD) by denom/contract address to their symbol + logoURI.
  • tokenDisplay.ts — getCachedTokenSymbol() and getTokenDisplaySymbol() now check the registry first, so symbols resolve immediately for all known tokens (including the synchronous pair selector dropdown that was the main bug).
  • useTokenDisplayInfo hook — now exposes logoURI from the registry.
  • TokenLogo component — renders the actual token logo image when a logoURI is available; falls back to blockie identicon if the image fails to load or for unknown CW20 tokens. Native tokens and known tokens without a logo get no icon (same as before for native, but now they'll show their logo if registered).
  • TokenDisplay component — passes logoURI through to TokenLogo.

Please verify:

  1. Swap page pair selector shows CL8Y / LUNC (etc.) instead of contract addresses
  2. "You Pay" / "You Receive" fields show token symbols with logo icons
  3. Pool page pool cards show token symbols with logos
  4. Unknown/unregistered CW20 tokens still show blockie + shortened address, then resolve via chain query
Fix pushed in commit c56e171. **What changed:** - **New `tokenRegistry.ts`** — static lookup table built from `tokenlist/tokenlist.json` mapping all 7 known tokens (LUNC, USTC, CL8Y, USTR, ALPHA, USTRIX, SpaceUSD) by denom/contract address to their symbol + logoURI. - **`tokenDisplay.ts`** — `getCachedTokenSymbol()` and `getTokenDisplaySymbol()` now check the registry first, so symbols resolve immediately for all known tokens (including the synchronous pair selector dropdown that was the main bug). - **`useTokenDisplayInfo` hook** — now exposes `logoURI` from the registry. - **`TokenLogo` component** — renders the actual token logo image when a `logoURI` is available; falls back to blockie identicon if the image fails to load or for unknown CW20 tokens. Native tokens and known tokens without a logo get no icon (same as before for native, but now they'll show their logo if registered). - **`TokenDisplay` component** — passes `logoURI` through to `TokenLogo`. **Please verify:** 1. Swap page pair selector shows `CL8Y / LUNC` (etc.) instead of contract addresses 2. "You Pay" / "You Receive" fields show token symbols with logo icons 3. Pool page pool cards show token symbols with logos 4. Unknown/unregistered CW20 tokens still show blockie + shortened address, then resolve via chain query
Brouie commented 2026-03-13 03:01:29 +00:00 (Migrated from gitlab.com)

Verified fixed — all 20 pairs show token symbols (EMBER, CORAL, JADE, etc.) instead of contract addresses.

Verified fixed — all 20 pairs show token symbols (EMBER, CORAL, JADE, etc.) instead of contract addresses.
Brouie commented 2026-03-13 04:22:44 +00:00 (Migrated from gitlab.com)

mentioned in issue #18

mentioned in issue #18
PlasticDigits commented 2026-05-31 05:37:06 +00:00 (Migrated from gitlab.com)

mentioned in issue #242

mentioned in issue #242
PlasticDigits commented 2026-08-08 11:17:15 +00:00 (Migrated from gitlab.com)

mentioned in issue #502

mentioned in issue #502
PlasticDigits commented 2026-08-08 11:26:46 +00:00 (Migrated from gitlab.com)

mentioned in issue #507

mentioned in issue #507
leonardocolucci commented 2026-08-16 14:30:17 +00:00 (Migrated from gitlab.com)

mentioned in issue #529

mentioned in issue #529
PlasticDigits commented 2026-08-18 00:39:12 +00:00 (Migrated from gitlab.com)

mentioned in issue #558

mentioned in issue #558
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#4
No description provided.