Browse Source

repayment type for escrow

bugfix/timeout-logging
Evan Feenstra 5 years ago
parent
commit
45bcd8c1d6
  1. 4
      api/utils/timers.ts
  2. 3
      config/constants.json
  3. 4
      dist/api/utils/timers.js
  4. 2
      dist/api/utils/timers.js.map
  5. 3
      dist/config/constants.json

4
api/utils/timers.ts

@ -68,9 +68,9 @@ export async function payBack(t){
network.sendMessage({
chat: theChat,
sender: owner,
message: {id:t.msgId},
message: {id:t.msgId,amount:t.amount,},
amount: t.amount,
type: constants.message_types.direct_payment,
type: constants.message_types.repayment,
})
models.Timer.destroy({where:{id:t.id}})
}

3
config/constants.json

@ -38,7 +38,8 @@
"group_join": 14,
"group_leave": 15,
"group_query": 16,
"delete": 17
"delete": 17,
"repayment": 18
},
"payment_errors": {
"timeout": "Timed Out",

4
dist/api/utils/timers.js

@ -93,9 +93,9 @@ function payBack(t) {
network.sendMessage({
chat: theChat,
sender: owner,
message: { id: t.msgId },
message: { id: t.msgId, amount: t.amount, },
amount: t.amount,
type: constants.message_types.direct_payment,
type: constants.message_types.repayment,
});
models_1.models.Timer.destroy({ where: { id: t.id } });
});

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

@ -1 +1 @@
{"version":3,"file":"timers.js","sourceRoot":"","sources":["../../../api/utils/timers.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,sCAAkC;AAClC,sCAAqC;AACrC,6BAA4B;AAE5B,MAAM,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,6BAA6B,CAAC,CAAC,CAAA;AAE7E,MAAM,MAAM,GAAC,EAAE,CAAA;AACf,SAAS,UAAU,CAAC,CAAC;IACjB,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAA;IACxB,IAAG,IAAI;QAAE,YAAY,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;AACvC,CAAC;AACD,SAAsB,kBAAkB,CAAC,KAAK;;QAC1C,MAAM,CAAC,GAAG,MAAM,eAAM,CAAC,KAAK,C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38,8 @@
"group_join": 14,
"group_leave": 15,
"group_query": 16,
"delete": 17
"delete": 17,
"repayment": 18
},
"payment_errors": {
"timeout": "Timed Out",

Loading…
Cancel
Save