fix: remove dead 1inch IPFS token list and make fetching resilient#428
Open
fernandomg wants to merge 1 commit intodevelopfrom
Open
fix: remove dead 1inch IPFS token list and make fetching resilient#428fernandomg wants to merge 1 commit intodevelopfrom
fernandomg wants to merge 1 commit intodevelopfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
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
fetchTokenListto 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.
02f1807 to
ea4a183
Compare
| * 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 |
| queryFn: () => fetchTokenList(url), | ||
| staleTime: Number.POSITIVE_INFINITY, | ||
| gcTime: Number.POSITIVE_INFINITY, | ||
| staleTime: 60 * 60 * 1000, |
Collaborator
There was a problem hiding this comment.
Super minor, but maybe put these in a const
gabitoesmiapodo
approved these changes
Mar 30, 2026
| */ | ||
| export const tokenLists = { | ||
| '1INCH': 'https://ipfs.io/ipns/tokens.1inch.eth', | ||
| COINGECKO: 'https://tokens.coingecko.com/uniswap/all.json', |
Collaborator
There was a problem hiding this comment.
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.
ea4a183 to
6a55fa1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The 1inch token list at
ipfs.io/ipns/tokens.1inch.ethreturns 504 on all IPFS gateways — the IPNS record is unmaintained. This breaks token loading sinceuseSuspenseQueriesrequires all sources to succeed.Changes
tokenLists.tsfetchTokenListresilient: failing sources log a warning and return an empty list instead of throwingAcceptance criteria
Test plan
pnpm test— all tests passpnpm tsc --noEmit— cleanBreaking changes
None.
Checklist