From d956899781ba44e0bf0a73e4ad83b8993dfd0053 Mon Sep 17 00:00:00 2001 From: saml33 Date: Thu, 2 Feb 2023 10:04:35 +1100 Subject: [PATCH] fix total interest value --- components/account/AccountPage.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/account/AccountPage.tsx b/components/account/AccountPage.tsx index 2adb6559..f6e84c43 100644 --- a/components/account/AccountPage.tsx +++ b/components/account/AccountPage.tsx @@ -166,7 +166,7 @@ const AccountPage = () => { const interestTotalValue = useMemo(() => { if (totalInterestData.length) { return totalInterestData.reduce( - (a, c) => a + c.borrow_interest_usd + c.deposit_interest_usd, + (a, c) => a + c.borrow_interest_usd * -1 + c.deposit_interest_usd, 0 ) }