You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
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());
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|