From abd9be921f33cad9aa5c5d9cae7f350a1f1c5c16 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Sun, 6 Mar 2022 01:03:06 -0800 Subject: [PATCH] Allow paying users negative amounts on market resolve. --- functions/src/utils.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/functions/src/utils.ts b/functions/src/utils.ts index 0e87538a..f34db1c8 100644 --- a/functions/src/utils.ts +++ b/functions/src/utils.ts @@ -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) }