aboutsummaryrefslogtreecommitdiffstats
path: root/routes
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-04-05 13:52:26 -0400
committerAdam Soltys <[email protected]>2020-04-05 13:52:26 -0400
commit86b32fdd423b1be3eb75c7fbcb934646cda79d62 (patch)
tree45319f504f34a5dc7097826930b294ed10841257 /routes
parent0a1a255b90a4567cec314979c619abcf2d789f62 (diff)
downloadcoinos-server-86b32fdd423b1be3eb75c7fbcb934646cda79d62.tar.gz
coinos-server-86b32fdd423b1be3eb75c7fbcb934646cda79d62.zip
better logging
Diffstat (limited to 'routes')
-rw-r--r--routes/lightning/send.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/routes/lightning/send.js b/routes/lightning/send.js
index b9680f1a..f07c8843 100644
--- a/routes/lightning/send.js
+++ b/routes/lightning/send.js
@@ -45,7 +45,10 @@ module.exports = async (req, res) => {
});
if (m.payment_error) return res.status(500).send(m.payment_error);
- if (seen.includes(m.payment_preimage)) return;
+ if (seen.includes(m.payment_preimage)) {
+ l.info("payment has already been seen", m.payment_preimage);
+ return;
+ }
seen.push(m.payment_preimage);
let total = parseInt(m.payment_route.total_amt);
@@ -53,8 +56,10 @@ module.exports = async (req, res) => {
user.balance -= total - payreq.satoshis;
+ l.info("deducting", total, payreq.satoshis);
await db.transaction(async transaction => {
await user.save({ transaction });
+ l.info("user saved");
const payment = await db.Payment.create(
{