diff options
| author | Adam Soltys <[email protected]> | 2021-08-04 07:00:20 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2021-08-04 08:16:43 -0700 |
| commit | ea2c9ed23c2b80f4a6200ee19fb4a6c77c3ccb95 (patch) | |
| tree | 1bb8ebcdf7b5bdbdc92ee536ef5517e711e9388c /routes/lightning | |
| parent | cfa93d65f113b4eed50cc88be76eeefa04a900eb (diff) | |
| download | coinos-server-ea2c9ed23c2b80f4a6200ee19fb4a6c77c3ccb95.tar.gz coinos-server-ea2c9ed23c2b80f4a6200ee19fb4a6c77c3ccb95.zip | |
config update, lnd support
Diffstat (limited to 'routes/lightning')
| -rw-r--r-- | routes/lightning/channel.js | 4 | ||||
| -rw-r--r-- | routes/lightning/invoice.js | 5 | ||||
| -rw-r--r-- | routes/lightning/send.js | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/routes/lightning/channel.js b/routes/lightning/channel.js index b6c4a25f..cb8ddf07 100644 --- a/routes/lightning/channel.js +++ b/routes/lightning/channel.js @@ -7,7 +7,7 @@ module.exports = ah(async (req, res) => { l.info("connecting to peer", req.user.username, pubkey, host); let result; try { - result = await lna.connectPeer({ + result = await lnp.connectPeer({ addr: { pubkey, host }, perm: true }); @@ -21,7 +21,7 @@ module.exports = ah(async (req, res) => { const { callback, k1 } = params; let remoteid; try { - remoteid = (await lna.getInfo({})).identity_pubkey; + remoteid = (await lnp.getInfo({})).identity_pubkey; } catch(e) { l.error("problem getting lightning node info", e.message); return res.status(500).send(e.message); diff --git a/routes/lightning/invoice.js b/routes/lightning/invoice.js index 1f3a0528..054a4a46 100644 --- a/routes/lightning/invoice.js +++ b/routes/lightning/invoice.js @@ -1,3 +1,4 @@ + module.exports = ah(async (req, res) => { let { amount, memo, tip } = req.body; if (!tip) tip = 0; @@ -14,11 +15,11 @@ module.exports = ah(async (req, res) => { ); res.send(invoice.bolt11); } else { - const invoice = await lna.addInvoice({ value, memo }); + const invoice = await lnp.addInvoice({ value, memo }); res.send(invoice.payment_request); } } catch (e) { - l.error("problem creating invoice", e.message); + l.error("problem creating invoice", e.message, e.stack); res.status(500).send(e.message); } }); diff --git a/routes/lightning/send.js b/routes/lightning/send.js index f6bd1b36..f3c0da46 100644 --- a/routes/lightning/send.js +++ b/routes/lightning/send.js @@ -5,7 +5,7 @@ module.exports = ah(async (req, res) => { try { res.send(await send(amount, memo, payreq, user)); } catch (e) { - l.error("problem sending lightning payment", user.username, e.message); + l.error("problem sending lightning payment", user.username, e.message, e.stack); res.status(500).send(e.message); } }); |
