mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-01-18 21:32:27 +01:00
Remove special case for showing crypto currency
This commit is contained in:
parent
f9e40b209a
commit
eeb522fe7d
@ -323,13 +323,12 @@ namespace BTCPayServer.Controllers
|
||||
provider = (NumberFormatInfo)provider.Clone();
|
||||
provider.CurrencyDecimalDigits = divisibility;
|
||||
}
|
||||
|
||||
if (_specialCryptoFormat.Contains(currency))
|
||||
|
||||
if (currencyData.Crypto)
|
||||
return price.ToString("C", provider);
|
||||
else
|
||||
return price.ToString("C", provider) + $" ({currency})";
|
||||
}
|
||||
private static readonly string[] _specialCryptoFormat = new[] { "BTC", "LTC" };
|
||||
|
||||
[HttpGet]
|
||||
[Route("i/{invoiceId}/status")]
|
||||
|
@ -31,6 +31,7 @@ namespace BTCPayServer.Services.Rates
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
public bool Crypto { get; set; }
|
||||
}
|
||||
public class CurrencyNameTable
|
||||
{
|
||||
@ -125,7 +126,8 @@ namespace BTCPayServer.Services.Rates
|
||||
{
|
||||
Code = network.CryptoCode,
|
||||
Divisibility = 8,
|
||||
Name = network.CryptoCode
|
||||
Name = network.CryptoCode,
|
||||
Crypto = true
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user