Fix loans bug

This commit is contained in:
James Grugett 2022-09-01 23:06:14 -05:00
parent 4406e53121
commit 8029ee49a4

View File

@ -118,7 +118,7 @@ const getFreeResponseContractLoanUpdate = (
contract: FreeResponseContract | MultipleChoiceContract, contract: FreeResponseContract | MultipleChoiceContract,
bets: Bet[] bets: Bet[]
) => { ) => {
const openBets = bets.filter((bet) => bet.isSold || bet.sale) const openBets = bets.filter((bet) => !bet.isSold && !bet.sale)
return openBets.map((bet) => { return openBets.map((bet) => {
const loanAmount = bet.loanAmount ?? 0 const loanAmount = bet.loanAmount ?? 0