fix: remove unused variable (#7061)

This commit is contained in:
eddie 2023-08-02 12:06:04 -07:00 committed by GitHub
parent 1ffb9421b2
commit a060bf1079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

@ -1,7 +1,8 @@
import defaultTokenList from '@uniswap/default-token-list'
import { UNI_LIST } from 'constants/lists'
import fetch from 'jest-fetch-mock'
import fetchTokenList, { DEFAULT_TOKEN_LIST } from './fetchTokenList'
import fetchTokenList from './fetchTokenList'
fetch.enableMocks()
@ -71,8 +72,8 @@ describe('fetchTokenList', () => {
})
it('fetches and validates the default token list', async () => {
fetch.mockOnceIf(DEFAULT_TOKEN_LIST, () => Promise.resolve(JSON.stringify(defaultTokenList)))
await expect(fetchTokenList(DEFAULT_TOKEN_LIST, resolver)).resolves.toStrictEqual(defaultTokenList)
fetch.mockOnceIf(UNI_LIST, () => Promise.resolve(JSON.stringify(defaultTokenList)))
await expect(fetchTokenList(UNI_LIST, resolver)).resolves.toStrictEqual(defaultTokenList)
expect(resolver).not.toHaveBeenCalled()
})

@ -4,8 +4,6 @@ import parseENSAddress from 'lib/utils/parseENSAddress'
import uriToHttp from 'lib/utils/uriToHttp'
import { validateTokenList } from 'utils/validateTokenList'
export const DEFAULT_TOKEN_LIST = 'https://gateway.ipfs.io/ipns/tokens.uniswap.org'
const listCache = new Map<string, TokenList>()
/**