Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DDW-702] Fix screen loading logic #1444

Merged
merged 9 commits into from
Jul 8, 2019
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Changelog

### Fixes

- Fixed screen flashes during Daedalus loading ([PR 1444](https://github.com/input-output-hk/daedalus/pull/1444))
- Removes files pushed without running Prettier ([PR 1445](https://github.com/input-output-hk/daedalus/pull/1445))
- Improved Stake pool tooltip positioning ([PR 1429](https://github.com/input-output-hk/daedalus/pull/1429))
- Moved the Tooltip logic from `StakePools.js` into `StakePoolsList.js` ([PR 1431](https://github.com/input-output-hk/daedalus/pull/1431))
Expand Down
12 changes: 4 additions & 8 deletions source/renderer/app/stores/NetworkStatusStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default class NetworkStatusStore extends Store {
);
};

@action async _restartNode() {
_restartNode = async () => {
nikolaglumac marked this conversation as resolved.
Show resolved Hide resolved
try {
Logger.info('NetworkStatusStore: Requesting a restart of cardano-node');
await restartCardanoNodeChannel.send();
Expand All @@ -162,7 +162,7 @@ export default class NetworkStatusStore extends Store {
error,
});
}
}
};

teardown() {
super.teardown();
Expand All @@ -187,7 +187,7 @@ export default class NetworkStatusStore extends Store {
};

_updateNodeStatus = async () => {
if (!this.isConnected) return;
if (this.environment.isTest && !this.isConnected) return;
try {
Logger.info('NetworkStatusStore: Updating node status');
await setCachedCardanoStatusChannel.send(this._extractNodeStatus(this));
Expand Down Expand Up @@ -231,11 +231,7 @@ export default class NetworkStatusStore extends Store {
status,
});
if (status)
runInAction('assigning node status', () => {
const { cardanoNodeID } = status;
this.cardanoNodeID = cardanoNodeID;
Object.assign(this, status);
});
runInAction('assigning node status', () => Object.assign(this, status));
} catch (error) {
Logger.error('NetworkStatusStore: error while requesting node state', {
error,
Expand Down