Skip to content

Commit

Permalink
hide token price change if no data is available (#3658)
Browse files Browse the repository at this point in the history
  • Loading branch information
wentokay authored Apr 10, 2023
1 parent 66d82fe commit a87a7d9
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,13 @@ function TokenHeader({
amount={token.nativeBalance}
displayLogo={false}
/>
<Typography className={classes.usdBalanceLabel}>
${parseFloat(token.usdBalance.toFixed(2)).toLocaleString()}
&nbsp;&nbsp;&nbsp;
<span className={percentClass}>{token.recentPercentChange}%</span>
</Typography>
{token.priceData ? (
<Typography className={classes.usdBalanceLabel}>
${parseFloat(token.usdBalance.toFixed(2)).toLocaleString()}
&nbsp;&nbsp;&nbsp;
<span className={percentClass}>{token.recentPercentChange}%</span>
</Typography>
) : null}
</div>
<div className={classes.tokenHeaderButtonContainer}>
<TransferWidget
Expand Down

1 comment on commit a87a7d9

@vercel
Copy link

@vercel vercel bot commented on a87a7d9 Apr 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.