diff options
| author | Adam Soltys <[email protected]> | 2020-08-20 11:36:14 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2020-08-20 11:36:30 -0700 |
| commit | cc6249b0afe23f7a9d43c58ad6da79595c8c1645 (patch) | |
| tree | f00568470d09d3a7d6cb8836a929bd56d9595ac0 /routes | |
| parent | 8f9ba2a587e7bc407dea1477296beb2ba644a5b3 (diff) | |
| download | coinos-server-cc6249b0afe23f7a9d43c58ad6da79595c8c1645.tar.gz coinos-server-cc6249b0afe23f7a9d43c58ad6da79595c8c1645.zip | |
remove lnb
Diffstat (limited to 'routes')
| -rw-r--r-- | routes/lightning/invoice.js | 4 | ||||
| -rw-r--r-- | routes/lightning/receive.js | 4 | ||||
| -rw-r--r-- | routes/lnurl.js | 2 | ||||
| -rw-r--r-- | routes/payments.js | 3 |
4 files changed, 3 insertions, 10 deletions
diff --git a/routes/lightning/invoice.js b/routes/lightning/invoice.js index 51eff332..701ed3c2 100644 --- a/routes/lightning/invoice.js +++ b/routes/lightning/invoice.js @@ -3,10 +3,10 @@ module.exports = ah(async (req, res) => { try { if (config.lna.clightning) { - const invoice = await lnb.invoice(`${amount + tip}sat` || "any", new Date(), memo, 360); + const invoice = await lna.invoice(`${amount + tip}sat` || "any", new Date(), memo, 360); res.send(invoice.bolt11); } else { - const invoice = await lnb.addInvoice({ value: amount + tip, memo }); + const invoice = await lna.addInvoice({ value: amount + tip, memo }); res.send(invoice.payment_request); } } catch (e) { diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js index e8246ab9..719a8184 100644 --- a/routes/lightning/receive.js +++ b/routes/lightning/receive.js @@ -111,11 +111,7 @@ if (config.lna.clightning) { }; poll(lna); - poll(lnb); } else { const invoices = lna.subscribeInvoices({}); invoices.on("data", handlePayment); - - const invoicesb = lnb.subscribeInvoices({}); - invoicesb.on("data", handlePayment); } diff --git a/routes/lnurl.js b/routes/lnurl.js index c6830ba1..90fa4c93 100644 --- a/routes/lnurl.js +++ b/routes/lnurl.js @@ -261,7 +261,7 @@ lnurlServer.bindToHook( if (recipient) { setTimeout(async () => { - let { invoices } = await lnb.listInvoices({ + let { invoices } = await lna.listInvoices({ pending_only: true, }); diff --git a/routes/payments.js b/routes/payments.js index 5e7263da..841d7d79 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -85,12 +85,9 @@ ah(async () => { if (config.lna) { if (config.lna.clightning) { const lnapath = join(require("os").homedir(), ".lightningreg/regtest"); - const lnbpath = join(require("os").homedir(), ".lightningregb/regtest"); lna = require("clightning-client")(lnapath); - lnb = require("clightning-client")(lnbpath); } else { lna = lnd(config.lna); - lnb = lnd(config.lnb); } app.post("/lightning/channel", require("./lightning/channel")); |
