aboutsummaryrefslogtreecommitdiffstats
path: root/routes/info.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-02 15:06:43 -0700
committerAdam Soltys <[email protected]>2022-09-02 15:06:43 -0700
commitd1cc66d1a02b75f90fbf0c05910777c76228259a (patch)
tree7b93dc6a2fc0ec9d03676d6b4093fedf9733f128 /routes/info.js
parent3161dd7ee95b6c7d70f8341298dd4fab84cda8b0 (diff)
downloadcoinos-server-d1cc66d1a02b75f90fbf0c05910777c76228259a.tar.gz
coinos-server-d1cc66d1a02b75f90fbf0c05910777c76228259a.zip
es6 migration
Diffstat (limited to 'routes/info.js')
-rw-r--r--routes/info.js6
1 files changed, 3 insertions, 3 deletions
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));
}