Skip to content

Commit

Permalink
fix(list): change the url of the default token list so we can move th…
Browse files Browse the repository at this point in the history
…e file in the npm package
  • Loading branch information
moodysalem committed Aug 11, 2020
1 parent 6e91311 commit 600049b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
4 changes: 4 additions & 0 deletions src/state/lists/reducer.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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']
})
)

1 comment on commit 600049b

@vercel
Copy link

@vercel vercel bot commented on 600049b Aug 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.