From 6285212a1e06412f78829df50d98136f325a39bd Mon Sep 17 00:00:00 2001 From: James Grugett Date: Wed, 2 Mar 2022 15:42:59 -0800 Subject: [PATCH] Update your trades to show total profit, invested value --- web/components/bets-list.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 7c6e5ffe..367ec0b6 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -127,8 +127,8 @@ export function BetsList(props: { user: User }) { const totalPortfolio = currentBetsValue + user.balance const totalPnl = totalPortfolio - user.totalDeposits - const totalProfit = (totalPnl / user.totalDeposits) * 100 - const investedProfit = + const totalProfitPercent = (totalPnl / user.totalDeposits) * 100 + const investedProfitPercent = ((currentBetsValue - currentInvestment) / currentInvestment) * 100 return ( @@ -136,17 +136,17 @@ export function BetsList(props: { user: User }) { -
Invested
+
Invested value
- {formatMoney(currentInvestment)}{' '} - + {formatMoney(currentBetsValue)}{' '} +
-
Total portfolio
+
Total profit
- {formatMoney(totalPortfolio)}{' '} - + {formatMoney(totalPnl)}{' '} +