diff --git a/BTCPayServer.Client/Models/InvoicePaymentMethodDataModel.cs b/BTCPayServer.Client/Models/InvoicePaymentMethodDataModel.cs index ab4e8ae40..609e7ddb3 100644 --- a/BTCPayServer.Client/Models/InvoicePaymentMethodDataModel.cs +++ b/BTCPayServer.Client/Models/InvoicePaymentMethodDataModel.cs @@ -53,7 +53,6 @@ namespace BTCPayServer.Client.Models public enum PaymentStatus { Invalid, - AwaitingConfirmation, AwaitingCompletion, Complete } diff --git a/BTCPayServer/Controllers/GreenField/InvoiceController.cs b/BTCPayServer/Controllers/GreenField/InvoiceController.cs index 376307882..86393594c 100644 --- a/BTCPayServer/Controllers/GreenField/InvoiceController.cs +++ b/BTCPayServer/Controllers/GreenField/InvoiceController.cs @@ -265,13 +265,10 @@ namespace BTCPayServer.Controllers.GreenField Id = data.GetPaymentId(), Status = !paymentEntity.Accounted ? InvoicePaymentMethodDataModel.Payment.PaymentStatus.Invalid - : data.PaymentCompleted(paymentEntity) + : data.PaymentConfirmed(paymentEntity, entity.SpeedPolicy) || + data.PaymentCompleted(paymentEntity) ? InvoicePaymentMethodDataModel.Payment.PaymentStatus.Complete - : data.PaymentConfirmed(paymentEntity, entity.SpeedPolicy) - ? InvoicePaymentMethodDataModel.Payment.PaymentStatus - .AwaitingCompletion - : InvoicePaymentMethodDataModel.Payment.PaymentStatus - .AwaitingConfirmation, + : InvoicePaymentMethodDataModel.Payment.PaymentStatus.AwaitingCompletion, Fee = paymentEntity.NetworkFee, Value = data.GetValue(), ReceivedDate = paymentEntity.ReceivedTime.DateTime diff --git a/BTCPayServer/wwwroot/swagger/v1/swagger.template.invoices.json b/BTCPayServer/wwwroot/swagger/v1/swagger.template.invoices.json index 97441f56c..5da8a0230 100644 --- a/BTCPayServer/wwwroot/swagger/v1/swagger.template.invoices.json +++ b/BTCPayServer/wwwroot/swagger/v1/swagger.template.invoices.json @@ -778,13 +778,11 @@ "description": "", "x-enumNames": [ "Invalid", - "AwaitingConfirmation", "AwaitingCompletion", "Complete" ], "enum": [ "Invalid", - "AwaitingConfirmation", "AwaitingCompletion", "Complete" ]