FIX: better stuck payments handling

This commit is contained in:
Overtorment
2019-04-13 18:56:12 +01:00
parent 35d8ff5599
commit 2c25a2090e
3 changed files with 14 additions and 4 deletions

View File

@@ -286,6 +286,16 @@ router.get('/gettxs', async function(req, res) {
try {
await u.accountForPosibleTxids();
let txs = await u.getTxs();
let lockedPayments = await u.getLockedPayments();
for (let locked of lockedPayments) {
txs.push({
type: 'paid_invoice',
fee: Math.floor(locked.amount * 0.01) /* feelimit */,
value: locked.amount + Math.floor(locked.amount * 0.01) /* feelimit */,
timestamp: locked.timestamp,
memo: 'Payment in transition',
});
}
res.send(txs);
} catch (Err) {
logger.log('', [req.id, 'error:', Err]);