diff --git a/cyberwow/lib/state.dart b/cyberwow/lib/state.dart index b28562d..c05af0a 100644 --- a/cyberwow/lib/state.dart +++ b/cyberwow/lib/state.dart @@ -199,21 +199,6 @@ class SyncedState extends HookedState { SyncedState(f, s, this.stdout, this.processOutput) : super (f, s); - void updateHeight(int h) { - if (height != h) { - height = h; - setState(this); - } - } - - void updateConnected(bool c) { - if (connected != c) { - // print('update connected: connected: ${connected}, c: ${c}'); - connected = c; - setState(this); - } - } - Future next() async { print("Synced next"); @@ -235,8 +220,9 @@ class SyncedState extends HookedState { break; } // print('synced loop'); - updateHeight(await rpc.height()); - updateConnected(await daemon.isConnected()); + height = await rpc.height(); + connected = await daemon.isConnected(); + setState(this); } }