From 609ba989b698802c4984f1f52aa48fa702ff7261 Mon Sep 17 00:00:00 2001 From: Tyler Shipe Date: Sat, 22 Jan 2022 21:48:26 -0500 Subject: [PATCH] fix issue with unloaded swap token info --- components/SwapTokenInfo.tsx | 4 ++-- components/SwapTokenInsights.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/SwapTokenInfo.tsx b/components/SwapTokenInfo.tsx index d121aeec..efdc4a75 100644 --- a/components/SwapTokenInfo.tsx +++ b/components/SwapTokenInfo.tsx @@ -201,8 +201,8 @@ const SwapTokenInfo: FunctionComponent = ({ {inputTokenInfo && outputTokenInfo ? (
{['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()}`}
) : null} {mouseData ? ( diff --git a/components/SwapTokenInsights.tsx b/components/SwapTokenInsights.tsx index 57980da9..3caad79c 100644 --- a/components/SwapTokenInsights.tsx +++ b/components/SwapTokenInsights.tsx @@ -216,7 +216,7 @@ const SwapTokenInsights = ({ formState, jupiterTokens, setOutputToken }) => { )}
- {insight.symbol.toUpperCase()} + {insight?.symbol?.toUpperCase()}
{insight.name}