mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Make sure checkout is not null in createinvoice
This commit is contained in:
@@ -113,7 +113,7 @@ namespace BTCPayServer.Controllers.GreenField
|
|||||||
{
|
{
|
||||||
ModelState.AddModelError(nameof(request.Currency), "Currency is required");
|
ModelState.AddModelError(nameof(request.Currency), "Currency is required");
|
||||||
}
|
}
|
||||||
|
request.Checkout = request.Checkout ?? new CreateInvoiceRequest.CheckoutOptions();
|
||||||
if (request.Checkout.PaymentMethods?.Any() is true)
|
if (request.Checkout.PaymentMethods?.Any() is true)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < request.Checkout.PaymentMethods.Length; i++)
|
for (int i = 0; i < request.Checkout.PaymentMethods.Length; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user