aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lightning/send.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2020-03-28 23:13:13 -0700
committerAdam Soltys <[email protected]>2020-03-28 23:13:13 -0700
commita0422300e2b13896634eda12930959bc64ba7dc9 (patch)
tree481915dc9e311d7dfc31d0b237b2c06ad5fa26a5 /routes/lightning/send.js
parent5142c8cfcffd59d04ec18e67183a1866324d9209 (diff)
downloadcoinos-server-a0422300e2b13896634eda12930959bc64ba7dc9.tar.gz
coinos-server-a0422300e2b13896634eda12930959bc64ba7dc9.zip
handle tips and invoices better
Diffstat (limited to 'routes/lightning/send.js')
-rw-r--r--routes/lightning/send.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/routes/lightning/send.js b/routes/lightning/send.js
index 38023a1d..de363a0a 100644
--- a/routes/lightning/send.js
+++ b/routes/lightning/send.js
@@ -6,6 +6,8 @@ module.exports = async (req, res) => {
let { route } = req.body;
let { user } = req;
+ l.info("attempting lightning payment", user.username, payreq.satoshis);
+
if (seen.includes(hash)) {
l.warn("attempted to pay a paid invoice", user.username);
return res.status(500).send("Invoice has been paid, can't pay again");
@@ -30,7 +32,7 @@ module.exports = async (req, res) => {
await user.save({ transaction });
});
} catch (e) {
- l.warn("insufficient funds for lightning payment", user.username);
+ l.warn("insufficient funds for lightning payment", user.username, user.balance);
return res.status(500).send("Not enough satoshis");
}