aboutsummaryrefslogtreecommitdiffstats
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/index.js b/index.js
index bd1f9183..c9af0479 100644
--- a/index.js
+++ b/index.js
@@ -89,7 +89,10 @@ const l = console.log
if (!payment) return
+ payment.received = true
payment.user.channelbalance += parseInt(msg.value)
+
+ await payment.save()
await payment.user.save()
payments.push(msg.payment_request)
@@ -353,6 +356,7 @@ const l = console.log
amount: req.body.amount,
currency: 'CAD',
rate: app.get('rates').ask,
+ tip: req.body.tip,
})
res.send(invoice)