diff --git a/core/api/src/domain/wallet-invoices/index.types.d.ts b/core/api/src/domain/wallet-invoices/index.types.d.ts index 749d4094bc8..f548c3b0c7e 100644 --- a/core/api/src/domain/wallet-invoices/index.types.d.ts +++ b/core/api/src/domain/wallet-invoices/index.types.d.ts @@ -93,7 +93,7 @@ type WalletInvoiceWithOptionalLnInvoice = { recipientWalletDescriptor: PartialWalletDescriptor paid: boolean createdAt: Date - processingCompleted?: boolean + processingCompleted: boolean lnInvoice?: LnInvoice // LnInvoice is optional because some older invoices don't have it } diff --git a/core/api/src/services/mongoose/schema.types.d.ts b/core/api/src/services/mongoose/schema.types.d.ts index 6fb8c28f0a3..757d3e071f9 100644 --- a/core/api/src/services/mongoose/schema.types.d.ts +++ b/core/api/src/services/mongoose/schema.types.d.ts @@ -69,7 +69,7 @@ interface WalletInvoiceRecord { currency: string timestamp: Date selfGenerated: boolean - processingCompleted?: boolean + processingCompleted: boolean pubkey: string paid: boolean paymentRequest?: string // optional because we historically did not store it diff --git a/core/api/src/services/mongoose/wallet-invoices.ts b/core/api/src/services/mongoose/wallet-invoices.ts index ffff1de9435..977d5c4e3a4 100644 --- a/core/api/src/services/mongoose/wallet-invoices.ts +++ b/core/api/src/services/mongoose/wallet-invoices.ts @@ -120,10 +120,7 @@ export const WalletInvoicesRepository = (): IWalletInvoicesRepository => { try { pending = WalletInvoice.find({ paid: false, - $or: [ - { processingCompleted: false }, - { processingCompleted: { $exists: false } }, // TODO remove this after migration - ], + processingCompleted: false, }).cursor({ batchSize: 100, })