Allow paying users negative amounts on market resolve.

This commit is contained in:
James Grugett 2022-03-06 01:03:06 -08:00
parent a8fd4c8014
commit abd9be921f

View File

@ -68,8 +68,7 @@ const updateUserBalance = (
}
export const payUser = (userId: string, payout: number, isDeposit = false) => {
if (!isFinite(payout) || payout <= 0)
throw new Error('Payout is not positive: ' + payout)
if (!isFinite(payout)) throw new Error('Payout is not finite: ' + payout)
return updateUserBalance(userId, payout, isDeposit)
}