From cc6249b0afe23f7a9d43c58ad6da79595c8c1645 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Thu, 20 Aug 2020 11:36:14 -0700 Subject: remove lnb --- lib/send.js | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'lib/send.js') diff --git a/lib/send.js b/lib/send.js index 4d2c3f75..519a152c 100644 --- a/lib/send.js +++ b/lib/send.js @@ -56,24 +56,6 @@ send = async (amount, memo, hash, user) => { preimage = preimage.toString("hex"); - if (payreq.payeeNodeKey === config.lnb.id) { - if (config.lna.clightning) { - let invoice = await lna.invoice( - `${amount}sat` || "any", - new Date(), - "", - 360 - ); - let { bolt11: payment_request } = invoice; - await lnb.pay(payment_request); - } else { - let invoice = await lna.addInvoice({ value: amount }); - let { payment_request } = invoice; - await lnb.sendPaymentSync({ payment_request, max_parts: 10 }); - } - l.info("lnb sent back", amount); - } - if (seen.includes(preimage)) { l.warn("duplicate payment detected", preimage); throw new Error("Duplicate payment detected"); -- cgit v1.2.3