From b5d8acfef3b0ee1c84e4f4cb45efae057ea49406 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Tue, 2 Aug 2022 17:31:49 -0700 Subject: [PATCH] Switch profit in bets tab to match user page --- web/components/bets-list.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 25cd00ad..648c2c26 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -157,9 +157,7 @@ export function BetsList(props: { (c) => contractsMetrics[c.id].netPayout ) - const totalPortfolio = currentNetInvestment + user.balance - - const totalPnl = totalPortfolio - user.totalDeposits + const totalPnl = user.profitCached.allTime const totalProfitPercent = (totalPnl / user.totalDeposits) * 100 const investedProfitPercent = ((currentBetsValue - currentInvested) / (currentInvested + 0.1)) * 100