FIX: user invoices are correctly processed if paid

This commit is contained in:
Overtorment committed 2018-12-25 13:50:09 +00:00
1 parent 2c2da6726f
commit 9e70f123a6
1 file changed
+5
+5
View File
@@ -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;