From 4e58ebca11ca68bfe08e3187e6cf13c01982bd4f Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 1 Oct 2022 16:40:24 -0700 Subject: increment invoice received --- routes/lightning/receive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routes/lightning/receive.js') diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js index 084161b5..898152fe 100644 --- a/routes/lightning/receive.js +++ b/routes/lightning/receive.js @@ -70,11 +70,11 @@ const handlePayment = async msg => { ); total = amount + tip; - invoice.received += total; invoice.status = "paid"; await invoice.save({ transaction }); + await invoice.increment({ received: total }, { transaction }); await account.increment({ balance: total }, { transaction }); // get the # of fee credits you would need to pay off this amount of bitcoin await account.increment( -- cgit v1.2.3