From ecebe5806f4f3b7a6a7fd50b5148e87e21daf077 Mon Sep 17 00:00:00 2001 From: Davide Silva Date: Tue, 21 May 2024 16:25:24 +0100 Subject: [PATCH] fix --- packages/web-app/app/_lib/queries.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web-app/app/_lib/queries.tsx b/packages/web-app/app/_lib/queries.tsx index ccb0a104..96c27c06 100644 --- a/packages/web-app/app/_lib/queries.tsx +++ b/packages/web-app/app/_lib/queries.tsx @@ -302,7 +302,7 @@ export const useUserTotalInvestedUsdcCtznd = (address: `0x${string}`) => { }, }); const { data: tokensInvested } = useReadCtzndSaleTokenToPaymentToken({ - args: [parseEther(formatUnits(ctzndTokensSold!, 6)) || 0n], + args: [parseEther(formatUnits(ctzndTokensSold || 0n, 6)) || 0n], }); const usdcValue = @@ -315,7 +315,7 @@ export const useCtzndMinContributionUsdc = () => { const { data: min } = useReadCtzndSaleMinContribution(); const { data: minUsdc } = useReadCtzndSaleTokenToPaymentToken({ - args: [parseEther(formatUnits(min!, 6)) || 0n], + args: [parseEther(formatUnits(min || 0n, 6)) || 0n], }); const usdcValue = min && minUsdc ? formatUnits(minUsdc, 6) : '0';