Skip to content

Commit

Permalink
Display form name in inherit from store setting
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisreimann authored and Kukks committed Nov 18, 2022
1 parent 58e2bba commit d4a5622
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BTCPayServer/Services/Stores/CheckoutFormSelectList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static class CheckoutFormSelectList
{
public static async Task<SelectList> ForStore(StoreData store, string selectedFormId, bool isStoreEntity, FormDataService formDataService)
{
var forms = await formDataService.GetForms(new FormDataService.FormQuery() {Stores = new string[] {store.Id}});
var forms = await formDataService.GetForms(new FormDataService.FormQuery { Stores = new [] { store.Id }});
var choices = new List<SelectListItem>();

if (isStoreEntity)
Expand All @@ -37,7 +37,7 @@ public static async Task<SelectList> ForStore(StoreData store, string selectedFo
var inherit = GenericOptionItem(GenericFormOption.InheritFromStore);
inherit.Text += Enum.TryParse<GenericFormOption>(blob.CheckoutFormId, out var item)
? $" ({DisplayName(item)})"
: $" ({blob.CheckoutFormId})";
: $" ({forms.Find(f => f.Id == blob.CheckoutFormId)?.Name ?? blob.CheckoutFormId })";

choices.Add(inherit);
}
Expand Down

0 comments on commit d4a5622

Please sign in to comment.