Skip to content

Commit

Permalink
Update localizedName & localeOverrides of CurrencyInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
erdemyerebasmaz committed Jun 25, 2024
1 parent 1fb06fc commit 4d5fed1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/routes/fiat_currencies/fiat_currency_settings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class FiatCurrencySettingsState extends State<FiatCurrencySettings> {

String _subtitle(BreezTranslations texts, FiatCurrency currencyData) {
final localizedName = currencyData.info.localizedName;
if (localizedName != null) {
if (localizedName.isNotEmpty) {
for (var localizedName in localizedName) {
if (localizedName.locale == texts.locale) {
return localizedName.name;
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/fiat_conversion.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class FiatConversion {

LocaleOverrides? _localeOverride(String languageTag, String languageCode) {
final localeOverrides = currencyData.info.localeOverrides;
if (localeOverrides == null || localeOverrides.isEmpty) return null;
if (localeOverrides.isEmpty) return null;
if (localeOverrides.any((e) => e.locale == languageTag)) {
return localeOverrides.firstWhere((e) => e.locale == languageTag);
}
Expand Down

0 comments on commit 4d5fed1

Please sign in to comment.