From af35a42356c46b7625e16f3a00567d027b8c8ba6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 26 Feb 2023 21:48:27 -0800 Subject: return total balance --- routes/info.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/routes/info.js b/routes/info.js index 45408269..ae347b56 100644 --- a/routes/info.js +++ b/routes/info.js @@ -6,9 +6,9 @@ export default { let lnchannel; let lnwallet; - let b = 0; + let total = 0; for await (let k of db.scanIterator({ MATCH: "balance:*" })) { - b += parseInt(await db.get(k)); + total += parseInt(await db.get(k)); } const funds = await ln.listfunds(); @@ -18,7 +18,7 @@ export default { const info = { lnchannel, lnwallet, - total: lnchannel + lnwallet + total }; res.send(info); -- cgit v1.2.3