From 981321e3722af3aba217aeddfba3843615085ec7 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 2 Sep 2022 23:32:30 -0700 Subject: es6 migration --- lib/ln.js | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'lib/ln.js') diff --git a/lib/ln.js b/lib/ln.js index 91a704e9..b1f9962d 100644 --- a/lib/ln.js +++ b/lib/ln.js @@ -4,22 +4,7 @@ let ln; if (config.lna.clightning) { ln = (await import("clightning-client"))(config.lna.dir); } else { - let lnd = await import("../lib/lnd"); - ln = [ - "addInvoice", - "channelBalance", - "connectPeer", - "decodePayReq", - "getInfo", - "listInvoices", - "listPayments", - "sendPaymentSync", - "walletBalance" - ].reduce( - (a, b) => - (a[b] = args => new Promise(r => lnd[b](args, (e, v) => r(v)))) && a, - {} - ); + ln = (await import("./lnd.js")); } export default ln; -- cgit v1.2.3