Merge branch 'main' of https://github.com/cake-tech/cake_wallet into CW-239-fix-restore-from-backup-using-6-digit-pin

 Conflicts:
	lib/store/settings_store.dart
This commit is contained in:
OmarHatem 2022-12-09 20:29:50 +02:00
commit f97a4fec28
38 changed files with 353 additions and 115 deletions

View file

@ -214,6 +214,7 @@ class BackupService {
final currentBitcoinElectrumSererId = data[PreferencesKey.currentBitcoinElectrumSererIdKey] as int?;
final currentLanguageCode = data[PreferencesKey.currentLanguageCode] as String?;
final displayActionListMode = data[PreferencesKey.displayActionListModeKey] as int?;
final fiatApiMode = data[PreferencesKey.currentFiatApiModeKey] as int?;
final currentPinLength = data[PreferencesKey.currentPinLength] as int?;
final currentTheme = data[PreferencesKey.currentTheme] as int?;
final disableExchange = data[PreferencesKey.disableExchangeKey] as bool?;
@ -267,6 +268,10 @@ class BackupService {
await _sharedPreferences.setInt(PreferencesKey.displayActionListModeKey,
displayActionListMode);
if (fiatApiMode != null)
await _sharedPreferences.setInt(PreferencesKey.currentFiatApiModeKey,
fiatApiMode);
if (currentPinLength != null)
await _sharedPreferences.setInt(PreferencesKey.currentPinLength,
currentPinLength);
@ -434,6 +439,8 @@ class BackupService {
_sharedPreferences.getInt(PreferencesKey.bitcoinTransactionPriority),
PreferencesKey.moneroTransactionPriority:
_sharedPreferences.getInt(PreferencesKey.moneroTransactionPriority),
PreferencesKey.currentFiatApiModeKey:
_sharedPreferences.getInt(PreferencesKey.currentFiatApiModeKey),
};
return json.encode(preferences);