Fix loan amount label to account for sales.
This commit is contained in:
parent
f14a87c9b3
commit
e0989bdfde
|
@ -437,7 +437,10 @@ export function ContractBetsTable(props: {
|
|||
-0.5 * _.sumBy(redemptions, (b) => b.shares)
|
||||
)
|
||||
|
||||
const amountLoaned = _.sumBy(bets, (bet) => bet.loanAmount ?? 0)
|
||||
const amountLoaned = _.sumBy(
|
||||
bets.filter((bet) => !bet.isSold && !bet.sale),
|
||||
(bet) => bet.loanAmount ?? 0
|
||||
)
|
||||
|
||||
const { isResolved, mechanism } = contract
|
||||
const isCPMM = mechanism === 'cpmm-1'
|
||||
|
|
Loading…
Reference in New Issue
Block a user