From d1cc66d1a02b75f90fbf0c05910777c76228259a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 2 Sep 2022 15:06:43 -0700 Subject: es6 migration --- routes/info.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'routes/info.js') diff --git a/routes/info.js b/routes/info.js index 537cdc44..2da1807c 100644 --- a/routes/info.js +++ b/routes/info.js @@ -35,16 +35,16 @@ app.get("/balances", async (req, res, next) => { let lnchannel; let lnwallet; - let lninfo; + let l; if (config.lna) { if (config.lna.clightning) { const funds = await lna.listfunds(); - lninfo = await lna.getinfo(); + l = await lna.getinfo(); lnchannel = parseInt(funds.channels.reduce((a, b) => a + b.channel_sat, 0)); lnwallet = parseInt(funds.outputs.reduce((a, b) => a + b.value, 0)); } else { - lninfo = await lnp.getInfo({}); + l = await lnp.getInfo({}); lnchannel = parseInt((await lnp.channelBalance({}).balance)); lnwallet = parseInt((await lnp.walletBalance({}).total_balance)); } -- cgit v1.2.3