From 37c933d0c67f5e157eb9e54f6c8312f8e18abb95 Mon Sep 17 00:00:00 2001 From: Mario Sarcevic Date: Thu, 7 Mar 2024 14:43:40 +0100 Subject: [PATCH] feat: Fix error with changed formatAmount --- .../app/components/stardust/statistics/InfluxChartsTab.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/app/components/stardust/statistics/InfluxChartsTab.tsx b/client/src/app/components/stardust/statistics/InfluxChartsTab.tsx index 4cdcba92f..56856c45e 100644 --- a/client/src/app/components/stardust/statistics/InfluxChartsTab.tsx +++ b/client/src/app/components/stardust/statistics/InfluxChartsTab.tsx @@ -35,8 +35,9 @@ export const InfluxChartsTab: React.FC = () => { analyticStats, ] = useChartsState(); - const lockedStorageDepositValue = - formatAmount(Number(analyticStats?.lockedStorageDeposit), tokenInfo).replace(COMMAS_REGEX, ",") ?? "-"; + const lockedStorageDepositValue = analyticStats?.lockedStorageDeposit + ? formatAmount(analyticStats.lockedStorageDeposit, tokenInfo).replace(COMMAS_REGEX, ",") + : "-"; const ids = idGenerator();