diff --git a/class/User.js b/class/User.js index a7db293..b3b7ed6 100644 --- a/class/User.js +++ b/class/User.js @@ -126,6 +126,7 @@ export class User { invoice.type = 'paid_invoice'; invoice.fee = parseInt(invoice.payment_route.total_fees_msat / 1000); invoice.value = parseInt((invoice.payment_route.total_fees_msat + invoice.payment_route.total_amt_msat) / 1000); + invoice.timestamp = invoice.decoded.timestamp; result.push(invoice); } diff --git a/controllers/api.js b/controllers/api.js index e8101ad..f64cca6 100644 --- a/controllers/api.js +++ b/controllers/api.js @@ -203,6 +203,7 @@ router.get('/gettxs', async function(req, res) { return errorBadAuth(res); } + await u.accountForPosibleTxids(); let txs = await u.getTxs(); res.send(txs); }); @@ -213,6 +214,7 @@ router.get('/getpending', async function(req, res) { return errorBadAuth(res); } + await u.accountForPosibleTxids(); let txs = await u.getPendingTxs(); res.send(txs); });