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/invoices.js | |
| parent | 2bd73639038bbc9cd4c75758eda685c89011231f (diff) | |
| download | coinos-server-972ea530e8139a0357b6b45ccdf9742d19ba6a26.tar.gz coinos-server-972ea530e8139a0357b6b45ccdf9742d19ba6a26.zip | |
validate tips
Diffstat (limited to 'lib/invoices.js')
| -rw-r--r-- | lib/invoices.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/invoices.js b/lib/invoices.js index 89c4f3d6..633072f3 100644 --- a/lib/invoices.js +++ b/lib/invoices.js @@ -40,6 +40,7 @@ export let generate = async ({ invoice, user, sender, }) => { if (!rate) rate = store.rates[currency]; if (fiat) amount = Math.round((SATS * fiat) / rate); if (amount < 0) fail("invalid amount"); + if (tip< 0) fail("invalid tip"); if (memo && memo.length > 200) fail("memo too long"); let id = v4(); |
