Browse Source

try catch

feature/dockerfile-arm
Evan Feenstra 5 years ago
parent
commit
b1fa481035
  1. 4
      api/utils/nodeinfo.ts
  2. 5
      dist/api/utils/nodeinfo.js
  3. 2
      dist/api/utils/nodeinfo.js.map

4
api/utils/nodeinfo.ts

@ -22,6 +22,7 @@ function nodeinfo(){
const clean = await isClean()
try {
lightning.channelBalance({}, (err, channelBalance) => {
if(err) console.log(err)
// const { balance, pending_open_balance } = channelBalance
@ -71,6 +72,9 @@ function nodeinfo(){
})
})
});
} catch(e){
console.log('=>',e)
}
})
}

5
dist/api/utils/nodeinfo.js

@ -27,6 +27,7 @@ function nodeinfo() {
const lightning = lightning_1.loadLightning();
const owner = yield models_1.models.Contact.findOne({ where: { isOwner: true } });
const clean = yield isClean();
try {
lightning.channelBalance({}, (err, channelBalance) => {
if (err)
console.log(err);
@ -78,6 +79,10 @@ function nodeinfo() {
});
});
});
}
catch (e) {
console.log('=>', e);
}
}));
}
exports.nodeinfo = nodeinfo;

2
dist/api/utils/nodeinfo.js.map

@ -1 +1 @@
{"version":3,"file":"nodeinfo.js","sourceRoot":"","sources":["../../../api/utils/nodeinfo.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,kDAAgD;AAChD,sCAAqC;AACrC,8CAA0D;AAC1D,sCAAgC;AAEhC,SAAS,QAAQ;IACf,OAAO,IAAI,OAAO,CAAC,CAAO,OAAO,EAAE,MAAM,EAAC,EAAE;QAC1C,IAAI,SAAS,GAAG,EAAE,CAAA;QAClB,IAAI;YACF,SAAS,GAAG,MAAM,QAAQ,CAAC,EAAE,EAAE,CAAA;SAChC;QAAC,OAAM,CAAC,EAAC;YACR,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;SACf;QAED,MAAM,UAAU,GAAG,MAAM,yBAAe,EAAE,CAAA;QAE1C,MAAM,GAAG,GAAG,MAAM,kBAAQ,EAAE,CAAA;QAE5B,MAAM,SAAS,GAAG,yBAAa,EAAE,CAAA;QACjC,MAAM,KAAK,GAAG,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