aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/payments.ts b/lib/payments.ts
index bdaf2b1d..d0c43235 100644
--- a/lib/payments.ts
+++ b/lib/payments.ts
@@ -159,7 +159,7 @@ export const debit = async ({
const userLimit = await g("limit");
const frozen = (await g("hardfreeze")) || ((await g("freeze")) && type !== PaymentType.internal);
- if (frozen || (amount > userLimit && !whitelisted) || amount > serverLimit) {
+ if (frozen || (userLimit != null && amount > userLimit && !whitelisted) || (serverLimit != null && amount > serverLimit)) {
warn("Blocking", user.username, amount, hash, user.id, type, frozen, userLimit, serverLimit);
fail("Problem sending payment");
}