From 7df309771e49a3bf72113556db8a0f333b5dbe9c Mon Sep 17 00:00:00 2001 From: ncoelho Date: Wed, 17 Feb 2021 15:16:05 +0100 Subject: [PATCH] print --- controllers/website.js | 10 +++++----- templates/index.html | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/controllers/website.js b/controllers/website.js index 70022f6..2028764 100644 --- a/controllers/website.js +++ b/controllers/website.js @@ -26,11 +26,11 @@ function updateLightning() { lightningListChannels = response; let channels = []; for (let channel of lightningListChannels.channels) { - let divider = 5242870; - let ascii_length1 = channel.local_balance / divider; - let ascii_length2 = channel.remote_balance / divider; - channel.local = ascii_length1; - channel.remote = ascii_length2; + let divider = 0.1; + let ascii_length1 = channel.local_balance * divider; + let ascii_length2 = channel.remote_balance * divider; + channel.local = (Math.round(ascii_length1)); + channel.remote = (Math.round(ascii_length2)); channel.capacity_btc = channel.capacity / 100000000; channel.name = pubkey2name[channel.remote_pubkey]; if (channel.name) { diff --git a/templates/index.html b/templates/index.html index 4cd7fe0..2791ccb 100644 --- a/templates/index.html +++ b/templates/index.html @@ -106,7 +106,7 @@ {{/name}} {{capacity_btc}} BTC -
+
{{^active}}
{{/active}}