fix issue with unloaded swap token info

This commit is contained in:
Tyler Shipe 2022-01-22 21:48:26 -05:00
parent 5736582956
commit 609ba989b6
2 changed files with 3 additions and 3 deletions

View File

@ -201,8 +201,8 @@ const SwapTokenInfo: FunctionComponent<SwapTokenInfoProps> = ({
{inputTokenInfo && outputTokenInfo ? (
<div className="text-th-fgd-3 text-sm">
{['usd-coin', 'tether'].includes(baseTokenId)
? `${inputTokenInfo.symbol.toUpperCase()}/${outputTokenInfo.symbol.toUpperCase()}`
: `${outputTokenInfo.symbol.toUpperCase()}/${inputTokenInfo.symbol.toUpperCase()}`}
? `${inputTokenInfo?.symbol?.toUpperCase()}/${outputTokenInfo?.symbol?.toUpperCase()}`
: `${outputTokenInfo?.symbol?.toUpperCase()}/${inputTokenInfo?.symbol?.toUpperCase()}`}
</div>
) : null}
{mouseData ? (

View File

@ -216,7 +216,7 @@ const SwapTokenInsights = ({ formState, jupiterTokens, setOutputToken }) => {
)}
<div className="text-left">
<div className="font-bold">
{insight.symbol.toUpperCase()}
{insight?.symbol?.toUpperCase()}
</div>
<div className="text-th-fgd-3 text-xs">
{insight.name}