diff --git a/BTCPayServer/Controllers/StorePullPaymentsController.PullPayments.cs b/BTCPayServer/Controllers/StorePullPaymentsController.PullPayments.cs index 70679217a..9e0bb7bb5 100644 --- a/BTCPayServer/Controllers/StorePullPaymentsController.PullPayments.cs +++ b/BTCPayServer/Controllers/StorePullPaymentsController.PullPayments.cs @@ -95,9 +95,13 @@ namespace BTCPayServer.Controllers model.PaymentMethodItems = paymentMethodOptions.Select(id => new SelectListItem(id.ToPrettyString(), id.ToString(), true)); model.Name ??= string.Empty; - model.Currency = model.Currency.ToUpperInvariant().Trim(); + model.Currency = model.Currency?.ToUpperInvariant()?.Trim() ?? String.Empty; + model.PaymentMethods ??= new List(); if (!model.PaymentMethods.Any()) { + // Since we assign all payment methods to be selected by default above we need to update + // them here to reflect user's selection so that they can correct their mistake + model.PaymentMethodItems = paymentMethodOptions.Select(id => new SelectListItem(id.ToPrettyString(), id.ToString(), false)); ModelState.AddModelError(nameof(model.PaymentMethods), "You need at least one payment method"); } if (_currencyNameTable.GetCurrencyData(model.Currency, false) is null) diff --git a/BTCPayServer/Views/StorePullPayments/NewPullPayment.cshtml b/BTCPayServer/Views/StorePullPayments/NewPullPayment.cshtml index 4f37e81b3..41563aa38 100644 --- a/BTCPayServer/Views/StorePullPayments/NewPullPayment.cshtml +++ b/BTCPayServer/Views/StorePullPayments/NewPullPayment.cshtml @@ -42,6 +42,7 @@ } +
Additional Options