aboutsummaryrefslogtreecommitdiffstats
path: root/public/css/calculator.less
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-09-06 19:40:55 -0700
committerAdam Soltys <[email protected]>2014-09-06 19:40:55 -0700
commite547723b23ccc58c832cac966b1b666a426afefb (patch)
tree757da6f03a771c612002300e60e2adf60c2f98d8 /public/css/calculator.less
parent86d321130850e15b580c1d4705fc0bdd9473f7d8 (diff)
downloadcoinos-server-e547723b23ccc58c832cac966b1b666a426afefb.tar.gz
coinos-server-e547723b23ccc58c832cac966b1b666a426afefb.zip
Generate key on registration
Diffstat (limited to 'public/css/calculator.less')
-rw-r--r--public/css/calculator.less13
1 files changed, 13 insertions, 0 deletions
diff --git a/public/css/calculator.less b/public/css/calculator.less
index 2764332b..10d4570d 100644
--- a/public/css/calculator.less
+++ b/public/css/calculator.less
@@ -71,3 +71,16 @@ td#total { font-weight: bold; text-align: right; }
@page {
margin: 0;
}
+
+div.pass-container {
+ height: 30px;
+}
+
+div.pass-bar {
+ height: 11px;
+ margin-top: 2px;
+}
+div.pass-hint {
+ font-family: arial;
+ font-size: 11px;
+}
{ color: #2B2; background-color: #F0FFF0 } /* Literal.String.Other */ .highlight .sr { color: #080; background-color: #FFF0FF } /* Literal.String.Regex */ .highlight .s1 { color: #D20; background-color: #FFF0F0 } /* Literal.String.Single */ .highlight .ss { color: #A60; background-color: #FFF0F0 } /* Literal.String.Symbol */ .highlight .bp { color: #038 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #06B; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #369 } /* Name.Variable.Class */ .highlight .vg { color: #D70 } /* Name.Variable.Global */ .highlight .vi { color: #33B } /* Name.Variable.Instance */ .highlight .vm { color: #369 } /* Name.Variable.Magic */ .highlight .il { color: #00D; font-weight: bold } /* Literal.Number.Integer.Long */
import { archive } from "$lib/db";
import db from "$lib/db";
import ln from "$lib/ln";

export default {
  async balances(req, res) {
    let lnchannel;
    let lnwallet;

    let total = 0;

    for await (let k of db.scanIterator({ MATCH: "balance:*" })) {
      total += parseInt(await db.get(k));
    }

    for await (let k of archive.scanIterator({ MATCH: "balance:*" })) {
      total += parseInt(await archive.get(k));
    }

    const funds = await ln.listfunds();
    lnchannel = parseInt(funds.channels.reduce((a, b) => a + b.channel_sat, 0));
    lnwallet = parseInt(funds.outputs.reduce((a, b) => a + b.value, 0));

    const info = {
      lnchannel,
      lnwallet,
      total,
    };

    res.send(info);
  },
};