mirror of
https://github.com/Cameri/nostream.git
synced 2025-06-30 10:20:32 +02:00
fix: confirm invoice confirmedAt is undefined (#320)
This commit is contained in:
committed by
GitHub
parent
7969701096
commit
e0e3a11afd
@ -11,7 +11,7 @@ export interface IPaymentsService {
|
||||
updateInvoice(invoice: Partial<Invoice>): Promise<void>
|
||||
updateInvoiceStatus(invoice: Pick<Invoice, 'id' | 'status'>): Promise<Invoice>
|
||||
confirmInvoice(
|
||||
invoice: Pick<Invoice, 'id' | 'amountPaid' | 'confirmedAt'>,
|
||||
invoice: Pick<Invoice, 'id' | 'amountPaid' | 'confirmedAt' | 'status' | 'pubkey'>,
|
||||
): Promise<void>
|
||||
sendInvoiceUpdateNotification(invoice: Invoice): Promise<void>
|
||||
getPendingInvoices(): Promise<Invoice[]>
|
||||
|
@ -51,6 +51,8 @@ export class OpenNodeCallbackController implements IController {
|
||||
try {
|
||||
await this.paymentsService.confirmInvoice({
|
||||
id: invoice.id,
|
||||
pubkey: invoice.pubkey,
|
||||
status: updatedInvoice.status,
|
||||
amountPaid: updatedInvoice.amountRequested,
|
||||
confirmedAt: updatedInvoice.confirmedAt,
|
||||
})
|
||||
|
@ -70,11 +70,14 @@ export class ZebedeeCallbackController implements IController {
|
||||
}
|
||||
|
||||
invoice.amountPaid = invoice.amountRequested
|
||||
invoice.status = updatedInvoice.status
|
||||
updatedInvoice.amountPaid = invoice.amountRequested
|
||||
|
||||
try {
|
||||
await this.paymentsService.confirmInvoice({
|
||||
id: invoice.id,
|
||||
pubkey: invoice.pubkey,
|
||||
status: invoice.status,
|
||||
confirmedAt: invoice.confirmedAt,
|
||||
amountPaid: invoice.amountRequested,
|
||||
})
|
||||
|
Reference in New Issue
Block a user