mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-26 06:08:40 +01:00
cw-1584-ironwood-migration-modal (#3481)
* ironwood migration modal * auto-show when migration begins * remove restricted import * new condition * string fix * only activate if ironwood is active * reaction safeguards * migration*
This commit is contained in:
@@ -151,6 +151,7 @@ abstract class SettingsStoreBase with Store {
|
||||
required this.mwebNodeUri,
|
||||
required this.mwebAdDismissed,
|
||||
required this.balanceHideCounter,
|
||||
required this.zcashMigrationModalViewed,
|
||||
required bool initialEnableAutomaticNodeSwitching,
|
||||
required String initialBackgroundImage,
|
||||
TransactionPriority? initialBitcoinTransactionPriority,
|
||||
@@ -766,6 +767,9 @@ abstract class SettingsStoreBase with Store {
|
||||
(int balanceHideCounter) =>
|
||||
_sharedPreferences.setInt(PreferencesKey.balanceHideCounter, balanceHideCounter));
|
||||
|
||||
reaction((_) => zcashMigrationModalViewed,
|
||||
(val) => _sharedPreferences.setBool(PreferencesKey.zcashMigrationModalViewed, val));
|
||||
|
||||
this.nodes.observe((change) {
|
||||
if (change.newValue != null && change.key != null) {
|
||||
_saveCurrentNode(change.newValue!, change.key!);
|
||||
@@ -1075,6 +1079,9 @@ abstract class SettingsStoreBase with Store {
|
||||
@observable
|
||||
bool mwebAdDismissed;
|
||||
|
||||
@observable
|
||||
bool zcashMigrationModalViewed;
|
||||
|
||||
final SecureStorage _secureStorage;
|
||||
final SharedPreferences _sharedPreferences;
|
||||
|
||||
@@ -1350,6 +1357,7 @@ abstract class SettingsStoreBase with Store {
|
||||
final enableAutomaticNodeSwitching =
|
||||
sharedPreferences.getBool(PreferencesKey.enableAutomaticNodeSwitching) ?? true;
|
||||
final backgroundImage = sharedPreferences.getString(PreferencesKey.backgroundImage) ?? '';
|
||||
final zcashMigrationModalViewed = sharedPreferences.getBool(PreferencesKey.zcashMigrationModalViewed) ?? false;
|
||||
|
||||
// If no value
|
||||
if (pinLength == null || pinLength == 0) {
|
||||
@@ -1762,6 +1770,7 @@ abstract class SettingsStoreBase with Store {
|
||||
initialBuiltinTor: builtinTor,
|
||||
mwebAdDismissed: mwebAdDismissed,
|
||||
balanceHideCounter: balanceHideCounter,
|
||||
zcashMigrationModalViewed: zcashMigrationModalViewed
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user