aboutsummaryrefslogtreecommitdiffstats
path: root/lib/payments.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-03-08 04:31:34 +0000
committerAdam Soltys <[email protected]>2024-03-08 04:31:34 +0000
commit972ea530e8139a0357b6b45ccdf9742d19ba6a26 (patch)
treeeb2774d174c12e7304694d1793811d0ae0abf685 /lib/payments.js
parent2bd73639038bbc9cd4c75758eda685c89011231f (diff)
downloadcoinos-server-972ea530e8139a0357b6b45ccdf9742d19ba6a26.tar.gz
coinos-server-972ea530e8139a0357b6b45ccdf9742d19ba6a26.zip
validate tips
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");