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 /lib/send.js | |
| parent | 8f9ba2a587e7bc407dea1477296beb2ba644a5b3 (diff) | |
| download | coinos-server-cc6249b0afe23f7a9d43c58ad6da79595c8c1645.tar.gz coinos-server-cc6249b0afe23f7a9d43c58ad6da79595c8c1645.zip | |
remove lnb
Diffstat (limited to 'lib/send.js')
| -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"); |
