Subtract loan amount from investment
This commit is contained in:
parent
03592f9c3e
commit
0592909248
|
@ -91,7 +91,7 @@ export function BetsList(props: { user: User }) {
|
|||
const contractsInvestment = _.mapValues(contractBets, (bets) => {
|
||||
return _.sumBy(bets, (bet) => {
|
||||
if (bet.isSold || bet.sale) return 0
|
||||
return bet.amount
|
||||
return bet.amount - (bet.loanAmount ?? 0)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user