Commit a060bf10 authored by eddie's avatar eddie Committed by GitHub

fix: remove unused variable (#7061)

parent 1ffb9421
import defaultTokenList from '@uniswap/default-token-list' import defaultTokenList from '@uniswap/default-token-list'
import { UNI_LIST } from 'constants/lists'
import fetch from 'jest-fetch-mock' import fetch from 'jest-fetch-mock'
import fetchTokenList, { DEFAULT_TOKEN_LIST } from './fetchTokenList' import fetchTokenList from './fetchTokenList'
fetch.enableMocks() fetch.enableMocks()
...@@ -71,8 +72,8 @@ describe('fetchTokenList', () => { ...@@ -71,8 +72,8 @@ describe('fetchTokenList', () => {
}) })
it('fetches and validates the default token list', async () => { it('fetches and validates the default token list', async () => {
fetch.mockOnceIf(DEFAULT_TOKEN_LIST, () => Promise.resolve(JSON.stringify(defaultTokenList))) fetch.mockOnceIf(UNI_LIST, () => Promise.resolve(JSON.stringify(defaultTokenList)))
await expect(fetchTokenList(DEFAULT_TOKEN_LIST, resolver)).resolves.toStrictEqual(defaultTokenList) await expect(fetchTokenList(UNI_LIST, resolver)).resolves.toStrictEqual(defaultTokenList)
expect(resolver).not.toHaveBeenCalled() expect(resolver).not.toHaveBeenCalled()
}) })
......
...@@ -4,8 +4,6 @@ import parseENSAddress from 'lib/utils/parseENSAddress' ...@@ -4,8 +4,6 @@ import parseENSAddress from 'lib/utils/parseENSAddress'
import uriToHttp from 'lib/utils/uriToHttp' import uriToHttp from 'lib/utils/uriToHttp'
import { validateTokenList } from 'utils/validateTokenList' import { validateTokenList } from 'utils/validateTokenList'
export const DEFAULT_TOKEN_LIST = 'https://gateway.ipfs.io/ipns/tokens.uniswap.org'
const listCache = new Map<string, TokenList>() const listCache = new Map<string, TokenList>()
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment