mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
Merge branch 'master' into CWA-160-add-contact-book-option-for-new-currencies
This commit is contained in:
commit
09a0bf5150
2 changed files with 7 additions and 4 deletions
|
@ -50,10 +50,7 @@ class NodeListPage extends BasePage {
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
Navigator.pop(context);
|
Navigator.pop(context);
|
||||||
await nodeList.reset();
|
await nodeList.reset();
|
||||||
if (nodeList.nodes.isNotEmpty) {
|
await settings.setCurrentNodeToDefault();
|
||||||
await settings.setCurrentNode(
|
|
||||||
node: nodeList.nodes[0]);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
child: Text(S.of(context).reset))
|
child: Text(S.of(context).reset))
|
||||||
],
|
],
|
||||||
|
|
|
@ -11,6 +11,7 @@ import 'package:cake_wallet/src/domain/common/transaction_priority.dart';
|
||||||
import 'package:cake_wallet/src/stores/action_list/action_list_display_mode.dart';
|
import 'package:cake_wallet/src/stores/action_list/action_list_display_mode.dart';
|
||||||
import 'package:cake_wallet/src/screens/settings/items/item_headers.dart';
|
import 'package:cake_wallet/src/screens/settings/items/item_headers.dart';
|
||||||
import 'package:cake_wallet/generated/i18n.dart';
|
import 'package:cake_wallet/generated/i18n.dart';
|
||||||
|
import 'package:cake_wallet/src/domain/common/default_settings_migration.dart';
|
||||||
|
|
||||||
part 'settings_store.g.dart';
|
part 'settings_store.g.dart';
|
||||||
|
|
||||||
|
@ -266,4 +267,9 @@ abstract class SettingsStoreBase with Store {
|
||||||
ItemHeaders.faq: S.current.faq
|
ItemHeaders.faq: S.current.faq
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future setCurrentNodeToDefault() async {
|
||||||
|
await changeCurrentNodeToDefault(sharedPreferences: _sharedPreferences, nodes: _nodes);
|
||||||
|
await loadSettings();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue