From cadfdbc0334dda35b5d095b02b8658a0d8466394 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sun, 21 Aug 2022 23:49:52 -0500 Subject: [PATCH] Filter loans to only unresolved contracts --- common/loans.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/loans.ts b/common/loans.ts index 01a8a790..64742b3e 100644 --- a/common/loans.ts +++ b/common/loans.ts @@ -67,7 +67,7 @@ const calculateLoanBetUpdates = ( const betsByContract = groupBy(bets, (bet) => bet.contractId) const contracts = filterDefined( Object.keys(betsByContract).map((contractId) => contractsById[contractId]) - ) + ).filter((c) => !c.isResolved) const betUpdates = filterDefined( contracts