Skip to content

Commit

Permalink
Merge pull request #115 from stakwork/fixrepay
Browse files Browse the repository at this point in the history
Fixrepay
  • Loading branch information
Evanfeenstra authored Nov 27, 2020
2 parents db2bd8c + 644283b commit b04d73e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
18 changes: 17 additions & 1 deletion dist/src/utils/timers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/src/utils/timers.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion src/utils/timers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,23 @@ export async function payBack(t){
message: {id:t.msgId,amount:t.amount},
amount: t.amount,
type: constants.message_types.repayment,
realSatsContactId: t.receiver
realSatsContactId: t.receiver,
success: function() {
var date = new Date();
date.setMilliseconds(0)
models.Message.create({
// chatId: chat.id,
type: constants.message_types.repayment,
sender: 1,
receiver: t.receiver,
date: date,
amount: t.amount,
createdAt: date,
updatedAt: date,
status: constants.statuses.received,
network_type: constants.network_types.lightning
})
}
})
models.Timer.destroy({where:{id:t.id}})
}

0 comments on commit b04d73e

Please sign in to comment.