diff --git a/api/controllers/payment.ts b/api/controllers/payment.ts index 0ee27d2..dbae6c6 100644 --- a/api/controllers/payment.ts +++ b/api/controllers/payment.ts @@ -6,8 +6,9 @@ import * as helpers from '../helpers' import { success } from '../utils/res' import * as lightning from '../utils/lightning' import {tokenFromTerms} from '../utils/ldat' +import * as constants from '../../config/constants.json' + -const constants = require(__dirname + '/../../config/constants.json'); const sendPayment = async (req, res) => { const { @@ -107,6 +108,7 @@ const sendPayment = async (req, res) => { success(res, jsonUtils.messageToJson(message, chat)) }, failure: (error) => { + message.update({status: constants.statuses.failed}) res.status(200); res.json({ success: false, error }); res.end(); diff --git a/api/hub.ts b/api/hub.ts index 4732d20..420eabe 100644 --- a/api/hub.ts +++ b/api/hub.ts @@ -135,13 +135,12 @@ const finishInviteInHub = (params, onSuccess, onFailure) => { }) .then(res => res.json()) .then(json => { - if (json.object) { - console.log('[hub] finished invite to hub') - onSuccess(json) - } else { - console.log('[hub] fail to finish invite in hub') - onFailure(json) - } + console.log('[hub] finished invite to hub') + onSuccess(json) + }) + .catch(e => { + console.log('[hub] fail to finish invite in hub') + onFailure(e) }) } diff --git a/dist/api/controllers/payment.js b/dist/api/controllers/payment.js index 6cfde63..0c2126f 100644 --- a/dist/api/controllers/payment.js +++ b/dist/api/controllers/payment.js @@ -17,7 +17,7 @@ const helpers = require("../helpers"); const res_1 = require("../utils/res"); const lightning = require("../utils/lightning"); const ldat_1 = require("../utils/ldat"); -const constants = require(__dirname + '/../../config/constants.json'); +const constants = require("../../config/constants.json"); const sendPayment = (req, res) => __awaiter(void 0, void 0, void 0, function* () { const { amount, chat_id, contact_id, destination_key, media_type, muid, text, remote_text, dimensions, remote_text_map, contact_ids, } = req.body; console.log('[send payment]', req.body); @@ -98,6 +98,7 @@ const sendPayment = (req, res) => __awaiter(void 0, void 0, void 0, function* () res_1.success(res, jsonUtils.messageToJson(message, chat)); }), failure: (error) => { + message.update({ status: constants.statuses.failed }); res.status(200); res.json({ success: false, error }); res.end(); diff --git a/dist/api/controllers/payment.js.map b/dist/api/controllers/payment.js.map index 9f49d46..11d74b0 100644 --- a/dist/api/controllers/payment.js.map +++ b/dist/api/controllers/payment.js.map @@ -1 +1 @@ -{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../api/controllers/payment.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,gCAAyC;AACzC,0CAAyC;AACzC,2CAA0C;AAC1C,sCAAqC;AACrC,sCAAsC;AACtC,gDAA+C;AAC/C,wCAA4C;AAE5C,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,8BAA8B,CAAC,CAAC;AAEtE,MAAM,WAAW,GAAG,CAAO,GAAG,EAAE,GAAG,EAAE,EAAE;IACrC,MAAM,EACJ,MAAM,EACN,OAAO,EACP,UAAU,EACV,eAAe,EACf,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,UAAU,EACV,eAAe,EACf,WAAW,GACZ,GAAG,GAAG,CAAC,IAAI,CAAA;IAEZ,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,GAAG,CAAC,IAAI,CAAC,CAAA;IAEvC,IAAI,eAAe,IAAI,CAAC,UAAU,IAAI,CAAC,OAAO,EAAE;QAC9C,OAAO,OAAO,CAAC,qBAAqB,CAAC;YACnC,eAAe;YACf,MAAM;YACN,GAAG,EAAC,IAAI;YACR,OAAO,EAAE,GAAG,EAAE;gBACZ,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;gBAC5B,aAAO,CAAC,GAAG,EAAE,EAAC,eAAe,EAAE,MAAM,EAAC,CAAC,CAAA;YACzC,CAAC;YACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;gBACjB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;gBAChB,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;gBACpC,GAAG,CAAC,GAAG,EAAE,CAAC;YACZ,CAA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a,CAAC;oBAChC,eAAe,EAAC,GAAG,CAAC,eAAe;oBACnC,YAAY;iBACb,CAAC,CAAA;aACH;QACH,CAAC,CAAC,CAAA;KACH;IAED,MAAM,IAAI,GAAO,MAAM,SAAS,CAAC,YAAY,EAAE,CAAA;IAC/C,MAAM,IAAI,GAAG,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAA;IAClC,IAAG,IAAI,IAAI,IAAI,CAAC,MAAM,EAAC;QACrB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAA,EAAE;YAChB,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAC5C,IAAG,GAAG,IAAI,GAAG,GAAC,CAAC,EAAE;gBACf,QAAQ,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAC,SAAS;oBACd,MAAM,EAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;oBAC1B,IAAI,EAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC;oBAChC,MAAM,EAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAC,CAAC,CAAC;oBAClC,YAAY,EAAE,GAAG,CAAC,YAAY;iBAC/B,CAAC,CAAA;aACH;QACH,CAAC,CAAC,CAAA;KACH;IAED,mBAAmB;IACnB,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;IAEtC,aAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;AAC9C,CAAC,CAAA,CAAC;AAKA,oCAAY"} \ No newline at end of file +{"version":3,"file":"payment.js","sourceRoot":"","sources":["../../../api/controllers/payment.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAgC;AAChC,gCAAyC;AACzC,0CAAyC;AACzC,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AI,CAAC,QAAQ,CAAA;IAClC,IAAG,IAAI,IAAI,IAAI,CAAC,MAAM,EAAC;QACrB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAA,EAAE;YAChB,MAAM,GAAG,GAAG,GAAG,CAAC,KAAK,IAAI,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YAC5C,IAAG,GAAG,IAAI,GAAG,GAAC,CAAC,EAAE;gBACf,QAAQ,CAAC,IAAI,CAAC;oBACZ,IAAI,EAAC,SAAS;oBACd,MAAM,EAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC;oBAC1B,IAAI,EAAC,QAAQ,CAAC,GAAG,CAAC,aAAa,CAAC;oBAChC,MAAM,EAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,GAAC,CAAC,CAAC;oBAClC,YAAY,EAAE,GAAG,CAAC,YAAY;iBAC/B,CAAC,CAAA;aACH;QACH,CAAC,CAAC,CAAA;KACH;IAED,mBAAmB;IACnB,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAA;IAEtC,aAAO,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAA;AAC9C,CAAC,CAAA,CAAC;AAKA,oCAAY"} \ No newline at end of file diff --git a/dist/api/hub.js b/dist/api/hub.js index faf4e86..c793262 100644 --- a/dist/api/hub.js +++ b/dist/api/hub.js @@ -130,14 +130,12 @@ const finishInviteInHub = (params, onSuccess, onFailure) => { }) .then(res => res.json()) .then(json => { - if (json.object) { - console.log('[hub] finished invite to hub'); - onSuccess(json); - } - else { - console.log('[hub] fail to finish invite in hub'); - onFailure(json); - } + console.log('[hub] finished invite to hub'); + onSuccess(json); + }) + .catch(e => { + console.log('[hub] fail to finish invite in hub'); + onFailure(e); }); }; exports.finishInviteInHub = finishInviteInHub; diff --git a/dist/api/hub.js.map b/dist/api/hub.js.map index 2f042cf..82d5389 100644 --- a/dist/api/hub.js.map +++ b/dist/api/hub.js.map @@ -1 +1 @@ -{"version":3,"file":"hub.js","sourceRoot":"","sources":["../../api/hub.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAA+B;AAC/B,oCAAmC;AACnC,yCAA8B;AAC9B,yCAAwC;AACxC,0CAAyC;AACzC,qCAAoC;AACpC,+CAAyC;AACzC,iDAAiD;AAEjD,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,GAAG,2BAA2B,CAAC,CAAC;AACnE,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,aAAa,CAAC;AAClD,MAAM,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAAC,CAAC;AAElD,MAAM,cAAc,GAAG,CAAO,MAAM,GAAG,EAAE,EAAE,EAAE;IAC3C,IAAI,GAAG,IAAI,YAAY,EAAE;QACvB,OAAM;KACP;IACD,MAAM,KAAK,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAC,CAAC,CAAA;IAEvE,4CAA4C;IAE5C,MAAM,aAAa,GAAG,MAAM,eAAM,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,CAAC,cAAE,CAAC,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,SAAS,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;IAEpM,KAAK,CAAC,MAAM,CAAC,WAAW,GAAG,gBAAgB,EAAE;QAC3C,MAAM,EAAE,MAAM;QACd,IAAI,EAAK,IAAI,CAAC,SAAS,CAA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AC/B,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;KAChD,CAAC;SACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACvB,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAAC,CAAA;AACxD,CAAC,CAAA,CAAA;AAMC,4CAAgB"} \ No newline at end of file diff --git a/dist/public/uploads/wolf.jpg b/dist/public/uploads/wolf.jpg deleted file mode 100644 index 5bce36e..0000000 Binary files a/dist/public/uploads/wolf.jpg and /dev/null differ