From 5ac2f74d40b8fc7ca43041d5ccae79feb53f7454 Mon Sep 17 00:00:00 2001 From: tomiir Date: Fri, 28 Jan 2022 14:30:05 -0300 Subject: [PATCH] Added error checking for Error string to asset display (#365) Co-authored-by: rocky-fleek --- .../Sign/components/Details/components/AssetDisplay.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Pages/Notification/components/Sign/components/Details/components/AssetDisplay.jsx b/source/Pages/Notification/components/Sign/components/Details/components/AssetDisplay.jsx index 8a02d3d5..58a4155c 100644 --- a/source/Pages/Notification/components/Sign/components/Details/components/AssetDisplay.jsx +++ b/source/Pages/Notification/components/Sign/components/Details/components/AssetDisplay.jsx @@ -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]);