mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-19 05:58:50 +02:00
[skip ci] change fiat api UI to swich mode
This commit is contained in:
@@ -18,7 +18,7 @@ abstract class PrivacySettingsViewModelBase with Store {
|
||||
bool get shouldSaveRecipientAddress => _settingsStore.shouldSaveRecipientAddress;
|
||||
|
||||
@computed
|
||||
FiatApiMode get fiatApiMode => _settingsStore.fiatApiMode;
|
||||
bool get fiatApiMode => _settingsStore.fiatApiMode == FiatApiMode.disabled;
|
||||
|
||||
@action
|
||||
void setShouldSaveRecipientAddress(bool value) => _settingsStore.shouldSaveRecipientAddress = value;
|
||||
@@ -27,5 +27,12 @@ abstract class PrivacySettingsViewModelBase with Store {
|
||||
void setEnableExchange(bool value) => _settingsStore.disableExchange = value;
|
||||
|
||||
@action
|
||||
void setFiatMode(FiatApiMode mode) => _settingsStore.fiatApiMode = mode;
|
||||
void setFiatMode(bool value) {
|
||||
if (value) {
|
||||
_settingsStore.fiatApiMode = FiatApiMode.disabled;
|
||||
return;
|
||||
}
|
||||
_settingsStore.fiatApiMode = FiatApiMode.enabled;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user