diff options
| author | Adam Soltys <[email protected]> | 2020-03-28 23:13:13 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-03-28 23:13:13 -0700 |
| commit | a0422300e2b13896634eda12930959bc64ba7dc9 (patch) | |
| tree | 481915dc9e311d7dfc31d0b237b2c06ad5fa26a5 /routes/lightning/send.js | |
| parent | 5142c8cfcffd59d04ec18e67183a1866324d9209 (diff) | |
| download | coinos-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.js | 4 |
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"); } |
