Fix conflicts with main

This commit is contained in:
OmarHatem 2023-05-23 22:57:37 +03:00
parent 0a76686c96
commit 256cbc09fc

View file

@ -99,7 +99,7 @@ abstract class SettingsStoreBase with Store {
} }
if (initialEthereumTransactionPriority != null) { if (initialEthereumTransactionPriority != null) {
priority[WalletType.ethereum] = initialEthereumTransactionPriority; priority[WalletType.ethereum] = initialEthereumTransactionPriority;
} }
reaction( reaction(
@ -148,18 +148,16 @@ abstract class SettingsStoreBase with Store {
reaction((_) => isAppSecure, (bool isAppSecure) { reaction((_) => isAppSecure, (bool isAppSecure) {
sharedPreferences.setBool(PreferencesKey.isAppSecureKey, isAppSecure); sharedPreferences.setBool(PreferencesKey.isAppSecureKey, isAppSecure);
setIsAppSecureNative(isAppSecure); setIsAppSecureNative(isAppSecure);
}); });
reaction( reaction((_) => disableBuy,
(_) => disableBuy, (bool disableBuy) => sharedPreferences.setBool(PreferencesKey.disableBuyKey, disableBuy));
(bool disableBuy) => sharedPreferences.setBool(
PreferencesKey.disableBuyKey, disableBuy));
reaction( reaction(
(_) => disableSell, (_) => disableSell,
(bool disableSell) => sharedPreferences.setBool( (bool disableSell) =>
PreferencesKey.disableSellKey, disableSell)); sharedPreferences.setBool(PreferencesKey.disableSellKey, disableSell));
reaction( reaction(
(_) => fiatApiMode, (_) => fiatApiMode,
@ -362,12 +360,9 @@ abstract class SettingsStoreBase with Store {
// FIX-ME: Check for which default value we should have here // FIX-ME: Check for which default value we should have here
final shouldSaveRecipientAddress = final shouldSaveRecipientAddress =
sharedPreferences.getBool(PreferencesKey.shouldSaveRecipientAddressKey) ?? false; sharedPreferences.getBool(PreferencesKey.shouldSaveRecipientAddressKey) ?? false;
final isAppSecure = final isAppSecure = sharedPreferences.getBool(PreferencesKey.isAppSecureKey) ?? false;
sharedPreferences.getBool(PreferencesKey.isAppSecureKey) ?? false; final disableBuy = sharedPreferences.getBool(PreferencesKey.disableBuyKey) ?? false;
final disableBuy = final disableSell = sharedPreferences.getBool(PreferencesKey.disableSellKey) ?? false;
sharedPreferences.getBool(PreferencesKey.disableBuyKey) ?? false;
final disableSell =
sharedPreferences.getBool(PreferencesKey.disableSellKey) ?? false;
final currentFiatApiMode = FiatApiMode.deserialize( final currentFiatApiMode = FiatApiMode.deserialize(
raw: sharedPreferences.getInt(PreferencesKey.currentFiatApiModeKey) ?? raw: sharedPreferences.getInt(PreferencesKey.currentFiatApiModeKey) ??
FiatApiMode.enabled.raw); FiatApiMode.enabled.raw);
@ -438,7 +433,7 @@ abstract class SettingsStoreBase with Store {
} }
if (ethereumNode != null) { if (ethereumNode != null) {
nodes[WalletType.ethereum] = ethereumNode; nodes[WalletType.ethereum] = ethereumNode;
} }
return SettingsStore( return SettingsStore(
@ -498,7 +493,7 @@ abstract class SettingsStoreBase with Store {
} }
if (sharedPreferences.getInt(PreferencesKey.ethereumTransactionPriority) != null) { if (sharedPreferences.getInt(PreferencesKey.ethereumTransactionPriority) != null) {
priority[WalletType.ethereum] = ethereum?.deserializeEthereumTransactionPriority( priority[WalletType.ethereum] = ethereum?.deserializeEthereumTransactionPriority(
sharedPreferences.getInt(PreferencesKey.ethereumTransactionPriority)!) ?? sharedPreferences.getInt(PreferencesKey.ethereumTransactionPriority)!) ??
priority[WalletType.ethereum]!; priority[WalletType.ethereum]!;
} }
@ -511,16 +506,14 @@ abstract class SettingsStoreBase with Store {
useTOTP2FA = sharedPreferences.getBool(PreferencesKey.useTOTP2FA) ?? useTOTP2FA; useTOTP2FA = sharedPreferences.getBool(PreferencesKey.useTOTP2FA) ?? useTOTP2FA;
numberOfFailedTokenTrials = numberOfFailedTokenTrials =
sharedPreferences.getInt(PreferencesKey.failedTotpTokenTrials) ?? numberOfFailedTokenTrials; sharedPreferences.getInt(PreferencesKey.failedTotpTokenTrials) ?? numberOfFailedTokenTrials;
sharedPreferences.getBool(PreferencesKey.shouldSaveRecipientAddressKey) ?? shouldSaveRecipientAddress; sharedPreferences.getBool(PreferencesKey.shouldSaveRecipientAddressKey) ??
isAppSecure = shouldSaveRecipientAddress;
sharedPreferences.getBool(PreferencesKey.isAppSecureKey) ?? isAppSecure; isAppSecure = sharedPreferences.getBool(PreferencesKey.isAppSecureKey) ?? isAppSecure;
disableBuy = disableBuy = sharedPreferences.getBool(PreferencesKey.disableBuyKey) ?? disableBuy;
sharedPreferences.getBool(PreferencesKey.disableBuyKey) ?? disableBuy; disableSell = sharedPreferences.getBool(PreferencesKey.disableSellKey) ?? disableSell;
disableSell = allowBiometricalAuthentication =
sharedPreferences.getBool(PreferencesKey.disableSellKey) ?? disableSell; sharedPreferences.getBool(PreferencesKey.allowBiometricalAuthenticationKey) ??
allowBiometricalAuthentication = sharedPreferences allowBiometricalAuthentication;
.getBool(PreferencesKey.allowBiometricalAuthenticationKey) ??
allowBiometricalAuthentication;
shouldShowMarketPlaceInDashboard = shouldShowMarketPlaceInDashboard =
sharedPreferences.getBool(PreferencesKey.shouldShowMarketPlaceInDashboard) ?? sharedPreferences.getBool(PreferencesKey.shouldShowMarketPlaceInDashboard) ??
shouldShowMarketPlaceInDashboard; shouldShowMarketPlaceInDashboard;