From dd5fd2e5bb96b3afa029b62a91b4bdaff282cbd3 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Tue, 8 Dec 2020 14:54:24 +0900 Subject: [PATCH] Make sure checkout is not null in createinvoice --- BTCPayServer/Controllers/GreenField/InvoiceController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BTCPayServer/Controllers/GreenField/InvoiceController.cs b/BTCPayServer/Controllers/GreenField/InvoiceController.cs index 74d923fdf..e94e5d327 100644 --- a/BTCPayServer/Controllers/GreenField/InvoiceController.cs +++ b/BTCPayServer/Controllers/GreenField/InvoiceController.cs @@ -113,7 +113,7 @@ namespace BTCPayServer.Controllers.GreenField { ModelState.AddModelError(nameof(request.Currency), "Currency is required"); } - + request.Checkout = request.Checkout ?? new CreateInvoiceRequest.CheckoutOptions(); if (request.Checkout.PaymentMethods?.Any() is true) { for (int i = 0; i < request.Checkout.PaymentMethods.Length; i++)