diff options
| author | Adam Soltys <[email protected]> | 2024-05-13 12:27:13 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-05-13 12:27:20 -0700 |
| commit | 8777ac8bf4d07db11660675248b081bb82bcd326 (patch) | |
| tree | 018d470f08257bfdccbdb7f313cde41f4f3fb565 /lib/payments.js | |
| parent | 62873c946bf8b7aa14634cf6d1105e5d13cd832e (diff) | |
| download | coinos-server-8777ac8bf4d07db11660675248b081bb82bcd326.tar.gz coinos-server-8777ac8bf4d07db11660675248b081bb82bcd326.zip | |
fail on paid invoice
Diffstat (limited to 'lib/payments.js')
| -rw-r--r-- | lib/payments.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/payments.js b/lib/payments.js index a754dc93..89636ed5 100644 --- a/lib/payments.js +++ b/lib/payments.js @@ -59,7 +59,9 @@ export let debit = async ({ let iid; if (invoice) { + if (invoice.received >= amount) fail("Invoice already paid"); ({ id: iid } = invoice); + ref = invoice.uid; let equivalentRate = |
