diff options
| author | Adam Soltys <[email protected]> | 2022-09-02 22:12:24 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-09-02 22:12:24 -0700 |
| commit | 13352f9b30eed52d2e7d0970d3cbd76f401d6de0 (patch) | |
| tree | e745685b2d7373ad391431323b0bdf5ff373b55a /routes/lightning | |
| parent | d1cc66d1a02b75f90fbf0c05910777c76228259a (diff) | |
| download | coinos-server-13352f9b30eed52d2e7d0970d3cbd76f401d6de0.tar.gz coinos-server-13352f9b30eed52d2e7d0970d3cbd76f401d6de0.zip | |
es6 migration
Diffstat (limited to 'routes/lightning')
| -rw-r--r-- | routes/lightning/receive.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/routes/lightning/receive.js b/routes/lightning/receive.js index e35d91ec..f013efd7 100644 --- a/routes/lightning/receive.js +++ b/routes/lightning/receive.js @@ -1,7 +1,9 @@ +import config from "../../config/index.js"; import { notify } from "../../lib/notifications.js"; import { callWebhook } from "../../lib/webhooks.js"; import { computeConversionFee } from './conversionFee.js'; import { sendLiquid } from "../liquid/send.js"; +import ln from "../../lib/ln.js"; const handlePayment = async (msg) => { l("incoming lightning payment", msg.value, msg.payment_request, msg.settled); @@ -147,8 +149,8 @@ if (config.lna.clightning) { wait(Math.max(...invoices.map((i) => i.pay_index).filter((n) => n))); }; - poll(lna); + poll(ln); } else { - const invoices = lna.subscribeInvoices({}); + const invoices = ln.subscribeInvoices({}); invoices.on("data", handlePayment); } |
