aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lightning/receive.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-10-01 16:40:24 -0700
committerAdam Soltys <[email protected]>2022-10-01 16:40:24 -0700
commit4e58ebca11ca68bfe08e3187e6cf13c01982bd4f (patch)
tree73509444ae0aa6b94b2119bd0df0b3f910227d8f /routes/lightning/receive.js
parent721f96b11d25eeb58342c5847b0a4bd3f5159dbb (diff)
downloadcoinos-server-4e58ebca11ca68bfe08e3187e6cf13c01982bd4f.tar.gz
coinos-server-4e58ebca11ca68bfe08e3187e6cf13c01982bd4f.zip
increment invoice received
Diffstat (limited to 'routes/lightning/receive.js')
-rw-r--r--routes/lightning/receive.js2
1 files changed, 1 insertions, 1 deletions
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(