Remove special case for showing crypto currency

This commit is contained in:
nicolas.dorier
2018-05-16 21:19:48 +09:00
parent f9e40b209a
commit eeb522fe7d
2 changed files with 5 additions and 4 deletions

View File

@@ -324,12 +324,11 @@ namespace BTCPayServer.Controllers
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")]

View File

@@ -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
});
}