aboutsummaryrefslogtreecommitdiffstats
path: root/routes/info.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-09-08 17:03:45 -0400
committerAdam Soltys <[email protected]>2022-09-08 17:03:45 -0400
commit5a552347b012cdebf1b5bc4834d650a1e97bfd3d (patch)
treef3acf6ab6205c18a44fe88528ad797006a63666f /routes/info.js
parente36990c368d991e7cd52be874ad200fc3bc7205a (diff)
downloadcoinos-server-5a552347b012cdebf1b5bc4834d650a1e97bfd3d.tar.gz
coinos-server-5a552347b012cdebf1b5bc4834d650a1e97bfd3d.zip
misc fixes
Diffstat (limited to 'routes/info.js')
-rw-r--r--routes/info.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/routes/info.js b/routes/info.js
index c7d39160..63f353a5 100644
--- a/routes/info.js
+++ b/routes/info.js
@@ -9,6 +9,7 @@ import lnd from "$lib/lnd";
import { getChannelBalance, getChainBalance } from "lightning";
import sequelize from "@sequelize/core";
+import { SATS } from "$lib/utils";
const { Op } = sequelize;
@@ -34,6 +35,7 @@ app.get("/info", async (req, res, next) => {
});
app.get("/balances", async (req, res, next) => {
+ try {
const accounts = await db.Account.findAll({
attributes: [
"asset",
@@ -90,4 +92,7 @@ app.get("/balances", async (req, res, next) => {
parseInt(lnwallet);
res.send(info);
+ } catch(e) {
+ console.log("problem getting balances", e)
+ }
});