diff --git a/lib/node.js b/lib/node.js index dfe4a20..4eefae4 100644 --- a/lib/node.js +++ b/lib/node.js @@ -331,8 +331,8 @@ Node.prototype.formatBlock = function (block) { if( !_.isUndefined(block) && !_.isUndefined(block.number) && block.number >= 0 && !_.isUndefined(block.difficulty) && !_.isUndefined(block.totalDifficulty) ) { - block.difficulty = web3.toDecimal( block.difficulty ); - block.totalDifficulty = web3.toDecimal( block.totalDifficulty ); + block.difficulty = block.difficulty.toString(10); + block.totalDifficulty = block.totalDifficulty.toString(10); return block; } @@ -451,11 +451,11 @@ Node.prototype.getStats = function(forced) if(results.peers !== null) { self.stats.active = true; - self.stats.peers = web3.toDecimal(results.peers); + self.stats.peers = results.peers; self.stats.pending = results.pending; self.stats.mining = results.mining; self.stats.hashrate = results.hashrate; - self.stats.gasPrice = web3.toBigNumber(results.gasPrice).toString(10); + self.stats.gasPrice = results.gasPrice.toString(10); } else { self.setInactive();