External providers can now be loaded

Implemented invoice protocol (see docs)
This commit is contained in:
2020-12-29 00:09:40 +01:00
parent 0b3502d81f
commit aa2147d509
12 changed files with 169 additions and 74 deletions

View File

@@ -21,6 +21,8 @@ export class InvoiceManager {
// Get all pending transcations
Invoice.find({ status: PaymentStatus.PENDING }).then(invoices => {
console.log('These are pending', invoices);
this.pendingInvoices = invoices;
});
@@ -28,8 +30,6 @@ export class InvoiceManager {
Invoice.find({ status: PaymentStatus.UNCONFIRMED }).then(invoices => {
this.unconfirmedTranscations = invoices;
});
this.watchConfirmations();
}
/**
@@ -75,11 +75,4 @@ export class InvoiceManager {
socketManager.emitInvoiceEvent(invoice, 'confirmationUpdate', { count });
return this.knownConfirmations.set(invoice.id, count);
}
/**
* This functions loops over each unconfirmed transaction to check if it reached "trusted" threshold.
*/
private watchConfirmations() {
}
}