diff --git a/src/constants/index.ts b/src/constants/index.ts index 057ddf8385d..9fea728cf94 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -164,5 +164,4 @@ export const MIN_ETH: JSBI = JSBI.exponentiate(JSBI.BigInt(10), JSBI.BigInt(16)) export const BETTER_TRADE_LINK_THRESHOLD = new Percent(JSBI.BigInt(75), JSBI.BigInt(10000)) // the Uniswap Default token list lives here -export const DEFAULT_TOKEN_LIST_URL = - 'https://unpkg.com/@uniswap/default-token-list@latest/uniswap-default.tokenlist.json' +export const DEFAULT_TOKEN_LIST_URL = 'https://unpkg.com/@uniswap/default-token-list@latest' diff --git a/src/state/lists/reducer.ts b/src/state/lists/reducer.ts index 6f9023e9778..e43b6c5ef1d 100644 --- a/src/state/lists/reducer.ts +++ b/src/state/lists/reducer.ts @@ -1,6 +1,7 @@ import { createReducer } from '@reduxjs/toolkit' import { getVersionUpgrade, VersionUpgrade } from '@uniswap/token-lists' import { TokenList } from '@uniswap/token-lists/dist/types' +import { updateVersion } from '../user/actions' import { acceptListUpdate, addList, fetchTokenList } from './actions' export interface ListsState { @@ -87,4 +88,7 @@ export default createReducer(initialState, builder => current: state.byUrl[url].pendingUpdate } }) + .addCase(updateVersion, state => { + delete state.byUrl['https://unpkg.com/@uniswap/default-token-list@latest/uniswap-default.tokenlist.json'] + }) )