FIX: user invoices are correctly processed if paid
This commit is contained in:
parent
2c2da6726f
commit
9e70f123a6
@ -186,6 +186,11 @@ export class User {
|
|||||||
// attempting to lookup invoice
|
// attempting to lookup invoice
|
||||||
let lookup_info = await this.lookupInvoice(invoice.payment_hash);
|
let lookup_info = await this.lookupInvoice(invoice.payment_hash);
|
||||||
invoice.ispaid = lookup_info.settled;
|
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;
|
invoice.amt = decoded.satoshis;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user