From 7478c6e6c7605aefcea5677606c9d46a64723965 Mon Sep 17 00:00:00 2001 From: cubedro Date: Wed, 27 May 2015 00:36:48 +0300 Subject: [PATCH] updated transformers --- lib/node.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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();