diff --git a/package.json b/package.json index f850fd21..34520505 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adex-interface", - "version": "0.69.8", + "version": "0.69.9", "private": true, "dependencies": { "@ambire/login-sdk-core": "^0.0.21", diff --git a/src/components/AdminPanel/Accounts.tsx b/src/components/AdminPanel/Accounts.tsx index 5a7c8f73..5f33c391 100644 --- a/src/components/AdminPanel/Accounts.tsx +++ b/src/components/AdminPanel/Accounts.tsx @@ -45,8 +45,15 @@ const AdminAnalytics = () => { }, [adexServicesRequest]) const data = useMemo(() => { + if (!accounts.length) { + return { + elements: [], + totalDeposits: 0, + totalCampaignsLocked: 0 + } + } // TODO: fix this when multy token - const decimals = accounts[0].balanceToken.decimals + const decimals = accounts[0]?.balanceToken?.decimals const totalDeposits = parseBigNumTokenAmountToDecimal( accounts?.reduce((sum, a) => sum + BigInt(a.fundsDeposited.total), 0n), decimals