mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 12:09:43 +00:00
16 lines
485 B
Dart
16 lines
485 B
Dart
import 'package:mobx/mobx.dart';
|
|
import 'package:cake_wallet/entities/node.dart';
|
|
import 'package:cake_wallet/store/app_store.dart';
|
|
|
|
ReactionDisposer _onCurrentNodeChangeReaction;
|
|
|
|
void startOnCurrentNodeChangeReaction(AppStore appStore) {
|
|
_onCurrentNodeChangeReaction?.reaction?.dispose();
|
|
appStore.settingsStore.nodes.observe((change) async {
|
|
try {
|
|
await appStore.wallet.connectToNode(node: change.newValue);
|
|
} catch (e) {
|
|
print(e.toString());
|
|
}
|
|
});
|
|
}
|