diff --git a/src/containers/shared/components/TokenSearchResults/TokenSearchResults.tsx b/src/containers/shared/components/TokenSearchResults/TokenSearchResults.tsx index 29ee68d6c..cab27481f 100644 --- a/src/containers/shared/components/TokenSearchResults/TokenSearchResults.tsx +++ b/src/containers/shared/components/TokenSearchResults/TokenSearchResults.tsx @@ -1,4 +1,4 @@ -import { useContext, useEffect, useState } from 'react' +import { useContext, useState } from 'react' import './styles.scss' import { useTranslation } from 'react-i18next' diff --git a/src/containers/shared/components/TokenSearchResults/TokenSearchRow.tsx b/src/containers/shared/components/TokenSearchResults/TokenSearchRow.tsx index 5a48aad44..630bc7ac9 100644 --- a/src/containers/shared/components/TokenSearchResults/TokenSearchRow.tsx +++ b/src/containers/shared/components/TokenSearchResults/TokenSearchRow.tsx @@ -1,6 +1,5 @@ import { Link } from 'react-router-dom' import { useTranslation } from 'react-i18next' -import { FC } from 'react' import { Amount } from '../Amount' import { localizeNumber } from '../../utils' import Currency from '../Currency' @@ -11,8 +10,8 @@ const parsePrice = (dollarPrice: string, xrpPrice: number): number => { return Number((parsedDollar * xrpPrice).toFixed(6)) } -const TokenLogo: FC<{ token: any }> = ({ token }) => - token.meta.token.icon ? ( +const tokenLogo = (token) => + token && token.meta?.token.icon ? ( @@ -20,7 +19,7 @@ const TokenLogo: FC<{ token: any }> = ({ token }) =>
) -const TokenName: FC<{ token: any }> = ({ token }) => +const tokenName = (token) => token.meta.token.name && (