[skip ci] fix fiat settings display

This commit is contained in:
Serhii 2022-12-08 09:56:04 +02:00
parent 37ca795756
commit a1dd22232b
2 changed files with 6 additions and 1 deletions

View file

@ -34,7 +34,8 @@ class DisplaySettingsPage extends BasePage {
onValueChange: (_, bool value) {
_displaySettingsViewModel.setShouldDisplayBalance(value);
}),
if (!isHaven)
//if (!isHaven) it does not work correctly
if(!_displaySettingsViewModel.disabledFiatApiMode)
SettingsPickerCell<FiatCurrency>(
title: S.current.settings_currency,
searchHintText: S.current.search_currency,

View file

@ -3,6 +3,7 @@ import 'package:cake_wallet/entities/fiat_currency.dart';
import 'package:cake_wallet/store/settings_store.dart';
import 'package:cake_wallet/themes/theme_base.dart';
import 'package:mobx/mobx.dart';
import 'package:cake_wallet/entities/fiat_api_mode.dart';
part 'display_settings_view_model.g.dart';
@ -30,6 +31,9 @@ abstract class DisplaySettingsViewModelBase with Store {
@computed
ThemeBase get theme => _settingsStore.currentTheme;
@computed
bool get disabledFiatApiMode => _settingsStore.fiatApiMode == FiatApiMode.disabled;
@action
void setBalanceDisplayMode(BalanceDisplayMode value) => _settingsStore.balanceDisplayMode = value;