diff --git a/package.json b/package.json index e0530d7c18..19b5368e87 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "@types/wcag-contrast": "^3.0.0", "@typescript-eslint/eslint-plugin": "^4.1.0", "@typescript-eslint/parser": "^4.1.0", - "@uniswap/default-token-list": "^2.1.0", "@uniswap/governance": "^1.0.2", "@uniswap/liquidity-staker": "^1.0.2", "@uniswap/merkle-distributor": "1.0.1", diff --git a/src/constants/lists.ts b/src/constants/lists.ts index 4a6a47200c..8e9a81d673 100644 --- a/src/constants/lists.ts +++ b/src/constants/lists.ts @@ -1,3 +1,4 @@ +const UNI_LIST = 'https://tokens.uniswap.org' const AAVE_LIST = 'tokenlist.aave.eth' const BA_LIST = 'https://raw.githubusercontent.com/The-Blockchain-Association/sec-notice-list/master/ba-sec-list.json' const CMC_ALL_LIST = 'https://api.coinmarketcap.com/data-api/v3/uniswap/all.json' @@ -16,6 +17,7 @@ export const UNSUPPORTED_LIST_URLS: string[] = [BA_LIST] // this is the default list of lists that are exposed to users // lower index == higher priority for token import const DEFAULT_LIST_OF_LISTS_TO_DISPLAY: string[] = [ + UNI_LIST, COMPOUND_LIST, AAVE_LIST, CMC_ALL_LIST, @@ -35,4 +37,4 @@ export const DEFAULT_LIST_OF_LISTS: string[] = [ ] // default lists to be 'active' aka searched across -export const DEFAULT_ACTIVE_LIST_URLS: string[] = [GEMINI_LIST] +export const DEFAULT_ACTIVE_LIST_URLS: string[] = [UNI_LIST, GEMINI_LIST] diff --git a/src/state/lists/hooks.ts b/src/state/lists/hooks.ts index 11fc8bb761..edd4230a7c 100644 --- a/src/state/lists/hooks.ts +++ b/src/state/lists/hooks.ts @@ -1,4 +1,3 @@ -import DEFAULT_TOKEN_LIST from '@uniswap/default-token-list' import { TokenList } from '@uniswap/token-lists' import { useMemo } from 'react' import { useAppSelector } from 'state/hooks' @@ -42,8 +41,6 @@ function listToTokenMap(list: TokenList): TokenAddressMap { return map } -const TRANSFORMED_DEFAULT_TOKEN_LIST = listToTokenMap(DEFAULT_TOKEN_LIST) - export function useAllLists(): AppState['lists']['byUrl'] { return useAppSelector((state) => state.lists.byUrl) } @@ -116,7 +113,7 @@ export function useInactiveListUrls(): string[] { export function useCombinedActiveList(): TokenAddressMap { const activeListUrls = useActiveListUrls() const activeTokens = useCombinedTokenMapFromUrls(activeListUrls) - return useMemo(() => combineMaps(activeTokens, TRANSFORMED_DEFAULT_TOKEN_LIST), [activeTokens]) + return activeTokens } // list of tokens not supported on interface for various reasons, used to show warnings and prevent swaps and adds diff --git a/yarn.lock b/yarn.lock index 9dc125892c..8a81dc40d6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4542,11 +4542,6 @@ "@typescript-eslint/types" "4.30.0" eslint-visitor-keys "^2.0.0" -"@uniswap/default-token-list@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@uniswap/default-token-list/-/default-token-list-2.1.0.tgz#06dc33fbdb3bc4c507d4e9ac8b8b62ef5b252c8d" - integrity sha512-Cd2CrtZ+rNk55txvO76EEZRWOyojX+YyY0xxVjiMN00Y9nKDCftYoUNvwy9d+VuTySYjyCAVUef4PdcongZAPg== - "@uniswap/governance@^1.0.2": version "1.0.2" resolved "https://registry.npmjs.org/@uniswap/governance/-/governance-1.0.2.tgz"