make sure token info is loaded on swap page

This commit is contained in:
tjs 2022-04-05 02:20:17 -04:00
parent cc3a971c2b
commit aaa5491896
1 changed files with 7 additions and 3 deletions

View File

@ -94,9 +94,13 @@ const SwapTokenSelect = ({
}, [])
const tokenInfos = useMemo(() => {
return sortedTokenMints.filter((token) => {
return !token?.name || !token?.symbol ? false : true
})
if (sortedTokenMints?.length) {
return sortedTokenMints.filter((token) => {
return !token?.name || !token?.symbol ? false : true
})
} else {
return []
}
}, [sortedTokenMints])
const handleUpdateSearch = (e) => {