aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/payments.js')
-rw-r--r--lib/payments.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/payments.js b/lib/payments.js
index 76286938..03085280 100644
--- a/lib/payments.js
+++ b/lib/payments.js
@@ -73,6 +73,7 @@ export let debit = async ({
}
let tip = parseInt(invoice?.tip) || null;
+ if (tip < 0) fail("Invalid tip");
if (!amount || amount < 0) fail("Amount must be greater than zero");