From f2dad8ba2a169d9db1ced652c4ebee407b3c6609 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 18 Aug 2021 20:14:29 +0000 Subject: make lnd optional --- index.js | 1 + routes/payments.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 44f41103..d1466b4c 100644 --- a/index.js +++ b/index.js @@ -120,3 +120,4 @@ process.on("SIGINT", process.exit); process.on("uncaughtException", function(exception) { console.log(exception); }); + diff --git a/routes/payments.js b/routes/payments.js index 70b711da..fc1f114b 100644 --- a/routes/payments.js +++ b/routes/payments.js @@ -2,7 +2,6 @@ const BitcoinCore = require("@asoltys/bitcoin-core"); const { Op } = require("sequelize"); const { join } = require("path"); const fs = require("fs"); -const lnd = require("../lib/lnd"); const read = require("../lib/read"); ah(async () => { @@ -96,6 +95,7 @@ ah(async () => { if (config.lna.clightning) { lna = require("clightning-client")(config.lna.dir); } else { + const lnd = require("../lib/lnd"); lna = lnd.default; lnp = [ "addInvoice", -- cgit v1.2.3