Skip to content

fix: remove dead 1inch IPFS token list and make fetching resilient#428

Open
fernandomg wants to merge 1 commit intodevelopfrom
fix/token-list-ipfs-504
Open

fix: remove dead 1inch IPFS token list and make fetching resilient#428
fernandomg wants to merge 1 commit intodevelopfrom
fix/token-list-ipfs-504

Conversation

@fernandomg
Copy link
Copy Markdown
Member

Summary

The 1inch token list at ipfs.io/ipns/tokens.1inch.eth returns 504 on all IPFS gateways — the IPNS record is unmaintained. This breaks token loading since useSuspenseQueries requires all sources to succeed.

Changes

  • Removed dead 1inch IPFS URL from tokenLists.ts
  • Made fetchTokenList resilient: failing sources log a warning and return an empty list instead of throwing

Acceptance criteria

  • No 504 errors from token list fetching
  • One failing token source doesn't block the entire app
  • CoinGecko + Uniswap default tokens still load correctly

Test plan

  • pnpm test — all tests pass
  • pnpm tsc --noEmit — clean
  • Verified locally: token lists load, no 504 errors in console

Breaking changes

None.

Checklist

  • Self-reviewed my own diff
  • Tests added or updated
  • Docs updated (if applicable)
  • No unrelated changes bundled in

@fernandomg fernandomg self-assigned this Mar 30, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 30, 2026

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

Project Deployment Actions Updated (UTC)
components.dappbooster Ready Ready Preview, Comment Mar 30, 2026 7:45pm
demo.dappbooster Ready Ready Preview, Comment Mar 30, 2026 7:45pm
docs.dappbooster Ready Ready Preview, Comment Mar 30, 2026 7:45pm

Request Review

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses token list loading failures caused by an unmaintained 1inch IPFS/IPNS token list and improves runtime resilience so a single failing list source doesn’t prevent tokens from loading.

Changes:

  • Removed the dead 1inch IPFS token list URL from configured token list sources.
  • Updated fetchTokenList to warn and return an empty list on failure instead of throwing.
  • Tweaked React Query options for token list fetching (added retry: 1).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/hooks/useTokenLists.ts Makes token list fetching non-throwing and adjusts query options to reduce hard failures.
src/constants/tokenLists.ts Removes the dead 1inch token list endpoint from configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

* The list follow the standard from: https://tokenlists.org/
*
* Token list must complain with the Schema defined in /src/token.ts
* Token list must comply with the Schema defined in /src/token.ts
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤣

queryFn: () => fetchTokenList(url),
staleTime: Number.POSITIVE_INFINITY,
gcTime: Number.POSITIVE_INFINITY,
staleTime: 60 * 60 * 1000,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Super minor, but maybe put these in a const

*/
export const tokenLists = {
'1INCH': 'https://ipfs.io/ipns/tokens.1inch.eth',
COINGECKO: 'https://tokens.coingecko.com/uniswap/all.json',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Do we know about some other alternatives we could add here? Just in case this one dies too.

The 1inch token list at ipfs.io/ipns/tokens.1inch.eth returns 504
on all IPFS gateways — the IPNS record is unmaintained.

Removed the dead source. Made fetchTokenList resilient: a failing
source now logs a warning and returns an empty list instead of
throwing, so one broken source doesn't block the entire app.
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