Skip to content

Commit

Permalink
chore: remove default token list from Uniswap (#1213)
Browse files Browse the repository at this point in the history
  • Loading branch information
hungdoansy authored Aug 8, 2022
1 parent 9113b4e commit d271bf5
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@
"@sentry/react": "^6.16.1",
"@trivago/prettier-plugin-sort-imports": "^3.3.0",
"@typeform/embed-react": "^1.2.4",
"@uniswap/default-token-list": "^2.0.0",
"aos": "^2.3.4",
"d3": "^7.3.0",
"dayjs": "^1.10.7",
Expand Down
8 changes: 1 addition & 7 deletions src/state/lists/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ChainId } from '@kyberswap/ks-sdk-core'
import DEFAULT_TOKEN_LIST from '@uniswap/default-token-list'
import { Tags, TokenList } from '@uniswap/token-lists'
import { useMemo } from 'react'
import { useSelector } from 'react-redux'
Expand Down Expand Up @@ -66,8 +65,6 @@ function listToTokenMap(list: TokenList): TokenAddressMap {
return map
}

const TRANSFORMED_DEFAULT_TOKEN_LIST = listToTokenMap(DEFAULT_TOKEN_LIST)

// returns all downloaded current lists
export type ListType = {
readonly [url: string]: {
Expand Down Expand Up @@ -188,10 +185,7 @@ function useDMMTokenList(): TokenAddressMap {

function useDefaultTokenList(): TokenAddressMap {
const dmmTokens = useDMMTokenList()

return useMemo(() => {
return combineMaps(dmmTokens, TRANSFORMED_DEFAULT_TOKEN_LIST)
}, [dmmTokens])
return dmmTokens
}

// get all the tokens from active lists, combine with local default tokens
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4340,11 +4340,6 @@
"@typescript-eslint/types" "4.33.0"
eslint-visitor-keys "^2.0.0"

"@uniswap/default-token-list@^2.0.0":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@uniswap/default-token-list/-/default-token-list-2.3.0.tgz#e5e522e775791999643aac9b0faf1ccfb4c49bd8"
integrity sha512-yfd4snv9K20tEbNwy9Vjym41RU3Yb2lN0seKxsgkr+m3f6oub2lWyXfTiNwgGFbOQPDvX4dxjMhA+M+S7mxqKg==

"@uniswap/lib@^4.0.1-alpha":
version "4.0.1-alpha"
resolved "https://registry.yarnpkg.com/@uniswap/lib/-/lib-4.0.1-alpha.tgz#2881008e55f075344675b3bca93f020b028fbd02"
Expand Down

0 comments on commit d271bf5

Please sign in to comment.