Filter loans to only unresolved contracts
This commit is contained in:
parent
3f7af65b8d
commit
cadfdbc033
|
@ -67,7 +67,7 @@ const calculateLoanBetUpdates = (
|
||||||
const betsByContract = groupBy(bets, (bet) => bet.contractId)
|
const betsByContract = groupBy(bets, (bet) => bet.contractId)
|
||||||
const contracts = filterDefined(
|
const contracts = filterDefined(
|
||||||
Object.keys(betsByContract).map((contractId) => contractsById[contractId])
|
Object.keys(betsByContract).map((contractId) => contractsById[contractId])
|
||||||
)
|
).filter((c) => !c.isResolved)
|
||||||
|
|
||||||
const betUpdates = filterDefined(
|
const betUpdates = filterDefined(
|
||||||
contracts
|
contracts
|
||||||
|
|
Loading…
Reference in New Issue
Block a user