Skip to content

Commit 600049b

Browse files
committed
fix(list): change the url of the default token list so we can move the file in the npm package
1 parent 6e91311 commit 600049b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/constants/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,5 +164,4 @@ export const MIN_ETH: JSBI = JSBI.exponentiate(JSBI.BigInt(10), JSBI.BigInt(16))
164164
export const BETTER_TRADE_LINK_THRESHOLD = new Percent(JSBI.BigInt(75), JSBI.BigInt(10000))
165165

166166
// the Uniswap Default token list lives here
167-
export const DEFAULT_TOKEN_LIST_URL =
168-
'https://unpkg.com/@uniswap/default-token-list@latest/uniswap-default.tokenlist.json'
167+
export const DEFAULT_TOKEN_LIST_URL = 'https://unpkg.com/@uniswap/default-token-list@latest'

src/state/lists/reducer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { createReducer } from '@reduxjs/toolkit'
22
import { getVersionUpgrade, VersionUpgrade } from '@uniswap/token-lists'
33
import { TokenList } from '@uniswap/token-lists/dist/types'
4+
import { updateVersion } from '../user/actions'
45
import { acceptListUpdate, addList, fetchTokenList } from './actions'
56

67
export interface ListsState {
@@ -87,4 +88,7 @@ export default createReducer(initialState, builder =>
8788
current: state.byUrl[url].pendingUpdate
8889
}
8990
})
91+
.addCase(updateVersion, state => {
92+
delete state.byUrl['https://unpkg.com/@uniswap/default-token-list@latest/uniswap-default.tokenlist.json']
93+
})
9094
)

0 commit comments

Comments
 (0)