aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/payments.js2
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 =