diff options
| author | Adam Soltys <[email protected]> | 2024-03-08 04:31:34 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-03-08 04:31:34 +0000 |
| commit | 972ea530e8139a0357b6b45ccdf9742d19ba6a26 (patch) | |
| tree | eb2774d174c12e7304694d1793811d0ae0abf685 /lib/payments.js | |
| parent | 2bd73639038bbc9cd4c75758eda685c89011231f (diff) | |
| download | coinos-server-972ea530e8139a0357b6b45ccdf9742d19ba6a26.tar.gz coinos-server-972ea530e8139a0357b6b45ccdf9742d19ba6a26.zip | |
validate tips
Diffstat (limited to 'lib/payments.js')
| -rw-r--r-- | lib/payments.js | 1 |
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"); |
