Add Fiat API mode to advanced privacy settings page

This commit is contained in:
OmarHatem
2023-03-02 19:13:00 +02:00
parent 8625e33537
commit de62987338
2 changed files with 36 additions and 50 deletions
@@ -16,7 +16,7 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
ExchangeApiMode get exchangeStatus => _settingsStore.exchangeStatus;
@computed
FiatApiMode get fiatApi => _settingsStore.fiatApiMode;
FiatApiMode get fiatApiMode => _settingsStore.fiatApiMode;
@observable
bool _addCustomNode = false;
@@ -29,21 +29,11 @@ abstract class AdvancedPrivacySettingsViewModelBase with Store {
bool get addCustomNode => _addCustomNode;
@action
void setFiatMode(bool value) {
if (value) {
_settingsStore.fiatApiMode = FiatApiMode.disabled;
return;
}
_settingsStore.fiatApiMode = FiatApiMode.enabled;
}
void setFiatApiMode(FiatApiMode fiatApiMode) => _settingsStore.fiatApiMode = fiatApiMode;
@action
void setExchangeApiMode(ExchangeApiMode value) {
_settingsStore.exchangeStatus = value;
}
void setExchangeApiMode(ExchangeApiMode value) => _settingsStore.exchangeStatus = value;
@action
void toggleAddCustomNode() {
_addCustomNode = !_addCustomNode;
}
void toggleAddCustomNode() => _addCustomNode = !_addCustomNode;
}