Skip to content

Commit

Permalink
Merge pull request #14 from Alethio/v2.5.2
Browse files Browse the repository at this point in the history
v2.5.2
  • Loading branch information
baxy authored May 23, 2019
2 parents 4b934ae + babe37d commit 667dfca
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 17 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog
All notable changes to this project will be documented in this file.

## [2.5.2] - 2019-05-23
- Fixed output on the stats variables sent to the server

## [2.5.1] - 2019-05-22
- Add support for "clientTimeout" messages from the server

Expand Down
10 changes: 5 additions & 5 deletions lib/client/protocol/Http.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export default class Http extends Abstract {
this.log.error(this.errorHandler.resolve(error));
}

data = (data === undefined) ? 0 : data;
data = (data) ? data : 0;
return callback(null, data);
});
},
Expand All @@ -211,7 +211,7 @@ export default class Http extends Abstract {
this.log.error(this.errorHandler.resolve(error));
}

data = (data === undefined) ? null : data;
data = (data) ? data.toString() : 0;
return callback(null, data);
});
},
Expand All @@ -221,7 +221,7 @@ export default class Http extends Abstract {
this.log.error(this.errorHandler.resolve(error));
}

data = (data === undefined) ? null : data;
data = (data) ? data : false;
return callback(null, data);
});
},
Expand All @@ -231,7 +231,7 @@ export default class Http extends Abstract {
this.log.error(this.errorHandler.resolve(error));
}

data = (data === undefined) ? 0 : data;
data = (data) ? data : 0;
return callback(null, data);
});
},
Expand All @@ -241,7 +241,7 @@ export default class Http extends Abstract {
this.log.error(this.errorHandler.resolve(error));
}

data = (data === undefined) ? 0 : data;
data = (data) ? data : 0;
return callback(null, data);
});
}
Expand Down
9 changes: 5 additions & 4 deletions lib/client/protocol/WebSocket.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,10 @@ export default class WebSocket extends Abstract {

let result = {
peers: 0,
gasPrice: null,
gasPrice: 0,
mining: false,
hashrate: 0
hashrate: 0,
pendingTXs: 0
};

let allPromises = [];
Expand All @@ -246,10 +247,10 @@ export default class WebSocket extends Abstract {
return data.toString();
}

return null;
return 0;
}).catch(error => {
this.log.error(this.errorHandler.resolve(error));
return null;
return 0;
});
allPromises.push(gasPrice);

Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ethstats-cli",
"version": "2.5.1",
"version": "2.5.2",
"description": "EthStats - CLI Client",
"homepage": "https://github.com/alethio/ethstats-cli",
"author": {
Expand Down

0 comments on commit 667dfca

Please sign in to comment.