From 32e37c94a58124246d9160e0cb54d25424c88504 Mon Sep 17 00:00:00 2001 From: katty barroso Date: Thu, 6 Feb 2025 17:16:06 +0100 Subject: [PATCH 1/2] Fix calculation fees --- centrifuge-app/src/pages/Pool/Assets/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centrifuge-app/src/pages/Pool/Assets/index.tsx b/centrifuge-app/src/pages/Pool/Assets/index.tsx index 7a4141ef0..2f9d7a2e9 100644 --- a/centrifuge-app/src/pages/Pool/Assets/index.tsx +++ b/centrifuge-app/src/pages/Pool/Assets/index.tsx @@ -118,7 +118,7 @@ export function PoolDetailAssets() { }, { label: `Total pending fees (${pool.currency.symbol})`, - value: `${pool.fees.totalPaid.isZero() ? '' : '-'}${formatBalance(pool.fees.totalPaid)}`, + value: `${pool.fees.totalPending.isZero() ? '' : formatBalance(pool.fees.totalPending)}`, heading: false, }, ] From 92f6e791b47895de6db4f1d20b16f294f754ca82 Mon Sep 17 00:00:00 2001 From: katty barroso Date: Fri, 7 Feb 2025 11:56:00 +0100 Subject: [PATCH 2/2] Add nav from subquery --- centrifuge-app/src/pages/Pool/Assets/index.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/centrifuge-app/src/pages/Pool/Assets/index.tsx b/centrifuge-app/src/pages/Pool/Assets/index.tsx index 2f9d7a2e9..0706971fb 100644 --- a/centrifuge-app/src/pages/Pool/Assets/index.tsx +++ b/centrifuge-app/src/pages/Pool/Assets/index.tsx @@ -85,13 +85,10 @@ export function PoolDetailAssets() { Dec(0) ) - const total = isTinlakePool ? pool.nav.total : pool.reserve.total.toDecimal().add(offchainReserve).add(totalAssets) - const totalNAV = isTinlakePool ? pool.nav.total : Dec(total as any).sub(pool.fees.totalPending.toDecimal()) - const pageSummaryData: { label: React.ReactNode; value: React.ReactNode; heading?: boolean }[] = [ { label: `Total NAV (${pool.currency.symbol})`, - value: formatBalance(totalNAV), + value: formatBalance(pool.nav.total), heading: true, }, {