Invoices can now be better sorted and filtered.

This commit is contained in:
2021-02-13 17:26:11 +01:00
parent 926945f3f9
commit dcfbaa571a
4 changed files with 56 additions and 21 deletions

View File

@@ -122,8 +122,7 @@ export class Provider implements BackendProvider {
for await (const [topic, msg] of this.sock) {
const rawtx = msg.toString('hex');
const tx = await this.decodeRawTransaction(rawtx);
tx.vout.forEach(output => {
// Loop over each output and check if the address of one matches the one of an invoice.
invoiceManager.getPendingInvoices().filter(item => { return item.paymentMethod === CryptoUnits.BITCOIN }).forEach(async invoice => {