fix display name of non-fiat traditional currencies

This commit is contained in:
woodser 2025-06-09 06:51:59 -04:00 committed by GitHub
parent ee49324fbb
commit 183782982c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -406,6 +406,13 @@ public class CurrencyUtil {
removedCryptoCurrency.isPresent() ? removedCryptoCurrency.get().getName() : Res.get("shared.na");
return getCryptoCurrency(currencyCode).map(TradeCurrency::getName).orElse(xmrOrRemovedAsset);
}
if (isTraditionalNonFiatCurrency(currencyCode)) {
return getTraditionalNonFiatCurrencies().stream()
.filter(currency -> currency.getCode().equals(currencyCode))
.findAny()
.map(TradeCurrency::getName)
.orElse(currencyCode);
}
try {
return Currency.getInstance(currencyCode).getDisplayName();
} catch (Throwable t) {