diff --git a/web/components/bets-list.tsx b/web/components/bets-list.tsx index 603763e9..e55cd22e 100644 --- a/web/components/bets-list.tsx +++ b/web/components/bets-list.tsx @@ -121,16 +121,32 @@ export function BetsList(props: { user: User }) { (c) => contractsCurrentValue[c.id] ) + const totalPortfolio = currentBetsValue + user.balance + + const pnl = totalPortfolio - user.totalDeposits + const totalReturn = + (pnl > 0 ? '+' : '') + ((pnl / user.totalDeposits) * 100).toFixed() + '%' + return ( + +
Total portfolio
+
{formatMoney(totalPortfolio)}
+ + +
Total profits & losses
+
+ {formatMoney(pnl)} ({totalReturn}) +
+
Currently invested
{formatMoney(currentInvestment)}
-
Current value
+
Current market value
{formatMoney(currentBetsValue)}