From 9e70f123a605c354b75d87ca76247eed9d622e1d Mon Sep 17 00:00:00 2001 From: Overtorment Date: Tue, 25 Dec 2018 13:50:09 +0000 Subject: [PATCH] FIX: user invoices are correctly processed if paid --- class/User.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/class/User.js b/class/User.js index 2c519ce..9e0f560 100644 --- a/class/User.js +++ b/class/User.js @@ -186,6 +186,11 @@ export class User { // attempting to lookup invoice let lookup_info = await this.lookupInvoice(invoice.payment_hash); invoice.ispaid = lookup_info.settled; + if (invoice.ispaid) { + // so invoice was paid after all + await this.setPaymentHashPaid(invoice.payment_hash); + await this.saveBalance((await this.getBalance()) + decoded.satoshis); + } } invoice.amt = decoded.satoshis;