Skip to content

fix: use static COMMON_BASES fallback when GQL unavailable#17

Open
artoo-claw wants to merge 2 commits intomainfrom
fix/token-selector-fallback
Open

fix: use static COMMON_BASES fallback when GQL unavailable#17
artoo-claw wants to merge 2 commits intomainfrom
fix/token-selector-fallback

Conversation

@artoo-claw
Copy link
Collaborator

Problem

The token selector shows no tokens because:

  1. The common tokens hook tries to enrich static token data via Uniswap GQL backend
  2. GQL fails for LightLink (not a supported chain)
  3. Enriched data comes back undefined, making the COMMON_BASES fallback useless
  4. Token list stays in loading state or shows empty

Fix

When GQL enrichment fails, fall back directly to static COMMON_BASES token options. Also sets loading=false when using fallback to prevent infinite loading spinner.

Combined with the API fix (PR #5 on uniswap-API adding project field to swappable_tokens), this should make the token selector work.

The common tokens fallback was going through useCurrencies -> GQL to
enrich the static token data. When GQL fails (LightLink not supported),
the enriched data is undefined, making the fallback useless.

Now falls back to static COMMON_BASES directly when GQL enrichment
also fails, and sets loading=false to prevent infinite loading state.
@vercel
Copy link

vercel bot commented Feb 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
uniswap-interface-web Ready Ready Preview, Comment Feb 9, 2026 11:36am

Request Review

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.

1 participant