diff options
| author | Adam Soltys <[email protected]> | 2020-03-26 08:37:02 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-03-26 08:37:02 -0700 |
| commit | 4eee705620cb0a7626d9d000d4c78c4691784bff (patch) | |
| tree | c03f19f8d85429f6639488079bf0df45031550a7 | |
| parent | fbaf4081785a84c265c465b668a44d43e1963b64 (diff) | |
| download | coinos-server-4eee705620cb0a7626d9d000d4c78c4691784bff.tar.gz coinos-server-4eee705620cb0a7626d9d000d4c78c4691784bff.zip | |
add tip to invoice amount
| -rw-r--r-- | routes/lightning/invoice.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/routes/lightning/invoice.js b/routes/lightning/invoice.js index 59f0df47..840321fb 100644 --- a/routes/lightning/invoice.js +++ b/routes/lightning/invoice.js @@ -1,16 +1,15 @@ module.exports = async (req, res) => { let err = m => res.status(500).send(m); - let { amount, address, tip } = req.body; + let { amount, tip } = req.body; let invoice; try { - invoice = await lnb.addInvoice({ value: amount }); + invoice = await lnb.addInvoice({ value: amount + tip }); } catch (e) { return err(e.message); } let hash = invoice.payment_request; - if (address) hash = address; await db.Payment.create({ user_id: req.user.id, |
