diff --git a/dist/src/controllers/details.js b/dist/src/controllers/details.js index 89d3391..4993df5 100644 --- a/dist/src/controllers/details.js +++ b/dist/src/controllers/details.js @@ -103,6 +103,7 @@ exports.getBalance = (req, res) => __awaiter(void 0, void 0, void 0, function* ( response.reserve = channels.reduce((a, chan) => a + parseInt(chan.local_constraints.chan_reserve_sat), 0); } catch (e) { + console.log("ERROR getBalance", e); res.json({ success: false }); } res.end(); diff --git a/dist/src/controllers/details.js.map b/dist/src/controllers/details.js.map index 864aea7..d6b6447 100644 --- a/dist/src/controllers/details.js.map +++ b/dist/src/controllers/details.js.map @@ -1 +1 @@ -{"version":3,"file":"details.js","sourceRoot":"","sources":["../../../src/controllers/details.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,kDAA4F;AAC5F,sCAA+C;AAC/C,iDAAgD;AAChD,gDAA6C;AAC7C,6BAA4B;AAC5B,4CAAoC;AACpC,sCAAkC;AAElC,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,uBAAuB,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;AAE7D,QAAA,UAAU,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC5C,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,KAAK,CAAA;IACpC,IAAI,CAAC,CAAC,MAAM,IAAI,MAAM,CAAC,MAAM,KAAK,EAAE,CAAC;QAAE,OAAO,aAAO,CAAC,GAAG,EAAE,cAAc,CAAC,CAAA;IAE1E,IAAI;QACH,MAAM,CAAC,GAAG,MAAM,sBAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,IAAI,mBAAS,CAAC,cAAc,CAAC,CAAA;QAChF,aAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAA;KACf;IAAC,OAAO,CAAC,EAAE;QACX,a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I,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,cAAc,EAAE,kBAAkB,EAAE,EAAE,CAAC,CAAC;SAChH;aAAM;YACN,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;SAC7B;QACD,GAAG,CAAC,GAAG,EAAE,CAAC;IACX,CAAC,CAAC,CAAA;AACH,CAAC,CAAA,CAAC;AAEW,QAAA,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IAC7C,IAAI,UAAU,GAAG,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC;IAC9C,IAAI,CAAC,CAAC,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,EAAE;QAC5E,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QACf,GAAG,CAAC,GAAG,EAAE,CAAA;QACT,OAAM;KACN;IACD,MAAM,IAAI,GAAG,MAAM,mBAAQ,EAAE,CAAA;IAC7B,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;IACf,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IACd,GAAG,CAAC,GAAG,EAAE,CAAA;AACV,CAAC,CAAA,CAAA;AAED,SAAe,YAAY,CAAC,KAAK,EAAE,QAAQ;;QAC1C,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YAClD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC3C;IACF,CAAC;CAAA"} \ No newline at end of file diff --git a/src/controllers/details.ts b/src/controllers/details.ts index 2a31007..1bc5209 100644 --- a/src/controllers/details.ts +++ b/src/controllers/details.ts @@ -90,6 +90,7 @@ export const getBalance = async (req, res) => { const { channels } = channelList response.reserve = channels.reduce((a, chan) => a + parseInt(chan.local_constraints.chan_reserve_sat), 0) } catch(e) { + console.log("ERROR getBalance",e) res.json({ success: false }); } res.end();