mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-18 06:24:24 +01:00
Ordering currencies by name
This commit is contained in:
@@ -189,7 +189,7 @@ namespace BTCPayServer.Controllers
|
|||||||
|
|
||||||
|
|
||||||
_CSP.Add(new ConsentSecurityPolicy("script-src", "'unsafe-eval'")); // Needed by Vue
|
_CSP.Add(new ConsentSecurityPolicy("script-src", "'unsafe-eval'")); // Needed by Vue
|
||||||
if(!string.IsNullOrEmpty(model.CustomCSSLink) &&
|
if (!string.IsNullOrEmpty(model.CustomCSSLink) &&
|
||||||
Uri.TryCreate(model.CustomCSSLink, UriKind.Absolute, out var uri))
|
Uri.TryCreate(model.CustomCSSLink, UriKind.Absolute, out var uri))
|
||||||
{
|
{
|
||||||
_CSP.Clear();
|
_CSP.Clear();
|
||||||
@@ -293,7 +293,8 @@ namespace BTCPayServer.Controllers
|
|||||||
CryptoImage = "/" + GetImage(kv.GetId(), kv.Network),
|
CryptoImage = "/" + GetImage(kv.GetId(), kv.Network),
|
||||||
Link = Url.Action(nameof(Checkout), new { invoiceId = invoiceId, paymentMethodId = kv.GetId().ToString() })
|
Link = Url.Action(nameof(Checkout), new { invoiceId = invoiceId, paymentMethodId = kv.GetId().ToString() })
|
||||||
}).Where(c => c.CryptoImage != "/")
|
}).Where(c => c.CryptoImage != "/")
|
||||||
.ToList()
|
.OrderBy(a => a.PaymentMethodName)
|
||||||
|
.ToList()
|
||||||
};
|
};
|
||||||
|
|
||||||
var expiration = TimeSpan.FromSeconds(model.ExpirationSeconds);
|
var expiration = TimeSpan.FromSeconds(model.ExpirationSeconds);
|
||||||
@@ -301,7 +302,7 @@ namespace BTCPayServer.Controllers
|
|||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static readonly Dictionary<string,string> CURRENCY_NAMES = new Dictionary<string, string>
|
private static readonly Dictionary<string, string> CURRENCY_NAMES = new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
{"BTC", "Bitcoin (BTC)" },
|
{"BTC", "Bitcoin (BTC)" },
|
||||||
{"BTC_LightningLike", "Bitcoin (BTC) Lightning" },
|
{"BTC_LightningLike", "Bitcoin (BTC) Lightning" },
|
||||||
@@ -353,7 +354,7 @@ namespace BTCPayServer.Controllers
|
|||||||
provider = (NumberFormatInfo)provider.Clone();
|
provider = (NumberFormatInfo)provider.Clone();
|
||||||
provider.CurrencyDecimalDigits = divisibility;
|
provider.CurrencyDecimalDigits = divisibility;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currencyData.Crypto)
|
if (currencyData.Crypto)
|
||||||
return price.ToString("C", provider);
|
return price.ToString("C", provider);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user