Commit 2291e3ec authored by Ian Lapham's avatar Ian Lapham Committed by GitHub

improvement(lists): enable Gemini by default (#1276)

* update import flow and style tweaks

* update tests

* Update tsconfig.json

* add gemini

* enable gemini
parent 28d8f0b0
......@@ -117,5 +117,8 @@
"last 1 safari version"
]
},
"license": "GPL-3.0-or-later"
"license": "GPL-3.0-or-later",
"dependencies": {
"@uniswap/default-token-list": "^2.0.0"
}
}
......@@ -16,6 +16,7 @@ const COINGECKO_LIST = 'https://tokens.coingecko.com/uniswap/all.json'
const CMC_ALL_LIST = 'defi.cmc.eth'
const CMC_STABLECOIN = 'stablecoin.cmc.eth'
const KLEROS_LIST = 't2crtokens.eth'
const GEMINI_LIST = 'https://www.gemini.com/uniswap/manifest.json'
// lower index == higher priority for token import
export const DEFAULT_LIST_OF_LISTS: string[] = [
......@@ -31,8 +32,9 @@ export const DEFAULT_LIST_OF_LISTS: string[] = [
CMC_ALL_LIST,
CMC_STABLECOIN,
KLEROS_LIST,
GEMINI_LIST,
...UNSUPPORTED_LIST_URLS // need to load unsupported tokens as well
]
// default lists to be 'active' aka searched across
export const DEFAULT_ACTIVE_LIST_URLS: string[] = []
export const DEFAULT_ACTIVE_LIST_URLS: string[] = [GEMINI_LIST]
import { UNSUPPORTED_LIST_URLS } from './../../constants/lists'
import DEFAULT_TOKEN_LIST from 'constants/tokenLists/uniswap-default.tokenlist.json'
import DEFAULT_TOKEN_LIST from '@uniswap/default-token-list'
import { ChainId, Token } from '@uniswap/sdk'
import { Tags, TokenInfo, TokenList } from '@uniswap/token-lists'
import { useMemo } from 'react'
......
......@@ -74,6 +74,11 @@ export default createReducer(initialState, builder =>
}
}
} else {
// activate if on default active
if (DEFAULT_ACTIVE_LIST_URLS.includes(url)) {
state.activeListUrls?.push(url)
}
state.byUrl[url] = {
...state.byUrl[url],
loadingRequestId: null,
......
......@@ -2691,6 +2691,11 @@
semver "^7.3.2"
tsutils "^3.17.1"
"@uniswap/default-token-list@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@uniswap/default-token-list/-/default-token-list-2.0.0.tgz#095b4c22635e532c817c3ba70e8838d8bd699716"
integrity sha512-P37PqBtUjEB9DIRFfmEsgougkV0555JQKiGPISeN9UFk1UgCQM5sg6+bBaShiyaqEpdtttAaBFI1QESCzPGvXw==
"@uniswap/governance@^1.0.2":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@uniswap/governance/-/governance-1.0.2.tgz#7371ab54dea9a5c045275001e2d5325ff2c11a93"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment