Fix refund button

This commit is contained in:
Kukks 2021-10-29 13:20:22 +02:00
parent 707484709a
commit 4c71167535

View File

@ -200,7 +200,7 @@ namespace BTCPayServer.Controllers
var refund = new RefundModel();
refund.Title = "Select a payment method";
refund.AvailablePaymentMethods = new SelectList(options.Select(id => new SelectListItem(id.ToPrettyString(), id.ToString())), "Value", "Text");
refund.SelectedPaymentMethod = defaultRefund?.ToString() ?? options.Select(o => o.CryptoCode).First();
refund.SelectedPaymentMethod = defaultRefund?.ToString() ?? invoice.GetBlob(_NetworkProvider).GetPaymentMethods().First().GetId().ToString();
// Nothing to select, skip to next
if (refund.AvailablePaymentMethods.Count() == 1)