diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/send.js | 18 |
1 files changed, 0 insertions, 18 deletions
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"); |
