Skip to content

Commit

Permalink
Remove failing yearn tokenlist (#3586)
Browse files Browse the repository at this point in the history
Resolves #3521

### Why
As we are not able to find a replacement and this was broken for a while
already let's just remove it.

Latest build:
[extension-builds-3586](https://github.com/tahowallet/extension/suites/14735256207/artifacts/837282268)
(as of Tue, 01 Aug 2023 17:00:01 GMT).
  • Loading branch information
hyphenized authored Aug 2, 2023
2 parents c53a135 + d87311f commit f56ce73
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
14 changes: 14 additions & 0 deletions background/services/preferences/db.ts
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,20 @@ export class PreferenceDatabase extends Dexie {
})
})

// Remove broken yearn's token list
this.version(20).upgrade((tx) => {
return tx
.table("preferences")
.toCollection()
.modify((storedPreferences: Preferences) => {
const urls = storedPreferences.tokenLists.urls.filter(
(url) => !url.includes("meta.yearn.finance")
)

Object.assign(storedPreferences.tokenLists, { urls })
})
})

// This is the old version for populate
// https://dexie.org/docs/Dexie/Dexie.on.populate-(old-version)
// The this does not behave according the new docs, but works
Expand Down
1 change: 0 additions & 1 deletion background/services/preferences/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const defaultPreferences: Preferences = {
"ipfs://bafybeihufwj43zej34itf66qyguq35k4f6s4ual4uk3iy643wn3xnff2ka"
).href, // the Taho community-curated list
"https://gateway.ipfs.io/ipns/tokens.uniswap.org", // the Uniswap default list
"https://meta.yearn.finance/api/tokens/list", // the Yearn list
"https://messari.io/tokenlist/messari-verified", // Messari-verified projects
"https://wrapped.tokensoft.eth.limo", // Wrapped tokens
"https://tokenlist.aave.eth.limo", // Aave-listed tokens and interest-bearing assets
Expand Down

0 comments on commit f56ce73

Please sign in to comment.