Skip to content

Commit

Permalink
Added error checking for Error string to asset display (#365)
Browse files Browse the repository at this point in the history
Co-authored-by: rocky-fleek <[email protected]>
  • Loading branch information
tomiir and rocky-fleek authored Jan 28, 2022
1 parent b59bd61 commit 5ac2f74
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const AssetDisplay = ({
const amount = getAssetAmount(request);
const assetData = getAssetData(request?.canisterId);
const formattedAsset = formatAssetBySymbol(amount, assetData.symbol, icpPrice);
formattedAsset.amount = Number.isNaN(formattedAsset.amount) ? null : formattedAsset.amount;
formattedAsset.amount = formattedAsset.amount === 'Error' || Number.isNaN(formattedAsset.amount) ? null : formattedAsset.amount;
setAsset(formattedAsset);
}, [request, icpPrice]);

Expand Down

0 comments on commit 5ac2f74

Please sign in to comment.