show list in import token dialog

This commit is contained in:
Moody Salem 2021-05-12 17:01:20 -05:00
parent 744db49803
commit e08e597655
No known key found for this signature in database
GPG Key ID: 8CB5CD10385138DB

@ -1,6 +1,7 @@
import { Currency, Token } from '@uniswap/sdk-core' import { Currency, Token } from '@uniswap/sdk-core'
import React, { useCallback, useEffect, useState } from 'react' import React, { useCallback, useEffect, useState } from 'react'
import useLast from '../../hooks/useLast' import useLast from '../../hooks/useLast'
import { WrappedTokenInfo } from '../../state/lists/wrappedTokenInfo'
import Modal from '../Modal' import Modal from '../Modal'
import { CurrencySearch } from './CurrencySearch' import { CurrencySearch } from './CurrencySearch'
import { ImportToken } from './ImportToken' import { ImportToken } from './ImportToken'
@ -81,6 +82,7 @@ export default function CurrencySearchModal({
<ImportToken <ImportToken
tokens={[importToken]} tokens={[importToken]}
onDismiss={onDismiss} onDismiss={onDismiss}
list={importToken instanceof WrappedTokenInfo ? importToken.list : undefined}
onBack={() => onBack={() =>
setModalView(prevView && prevView !== CurrencyModalView.importToken ? prevView : CurrencyModalView.search) setModalView(prevView && prevView !== CurrencyModalView.importToken ? prevView : CurrencyModalView.search)
} }