diff --git a/BTCPayServer/Views/Invoice/PosData.cshtml b/BTCPayServer/Views/Invoice/PosData.cshtml index 3b36c4d20..d305ba54d 100644 --- a/BTCPayServer/Views/Invoice/PosData.cshtml +++ b/BTCPayServer/Views/Invoice/PosData.cshtml @@ -1,41 +1,41 @@ @model (Dictionary Items, int Level) -@functions{ - async Task DisplayValue(object value) - { - if (value is string str && str.StartsWith("http")) - { - @str - } - else - { - @value - } - } -} - @foreach (var (key, value) in Model.Items) { - @if (value is string) + @if (value is string str) { if (!string.IsNullOrEmpty(key)) { } } else if (value is DictionarysubItems) { @* This is the array case *@ - if (subItems.Count == 1 && subItems.First().Value is string) + if (subItems.Count == 1 && subItems.First().Value is string str2) { } else
@key - @{ await DisplayValue(value); } + @if (str.StartsWith("http")) + { + @str + } + else + { + @value + } @key - @{ await DisplayValue(subItems.First().Value); } + @if (str2.StartsWith("http")) + { + @str2 + } + else + { + @subItems.First().Value + }