updated transformers

This commit is contained in:
cubedro 2015-05-27 00:36:48 +03:00
parent 145be0a80b
commit 7478c6e6c7

View File

@ -331,8 +331,8 @@ Node.prototype.formatBlock = function (block)
{ {
if( !_.isUndefined(block) && !_.isUndefined(block.number) && block.number >= 0 && !_.isUndefined(block.difficulty) && !_.isUndefined(block.totalDifficulty) ) if( !_.isUndefined(block) && !_.isUndefined(block.number) && block.number >= 0 && !_.isUndefined(block.difficulty) && !_.isUndefined(block.totalDifficulty) )
{ {
block.difficulty = web3.toDecimal( block.difficulty ); block.difficulty = block.difficulty.toString(10);
block.totalDifficulty = web3.toDecimal( block.totalDifficulty ); block.totalDifficulty = block.totalDifficulty.toString(10);
return block; return block;
} }
@ -451,11 +451,11 @@ Node.prototype.getStats = function(forced)
if(results.peers !== null) if(results.peers !== null)
{ {
self.stats.active = true; self.stats.active = true;
self.stats.peers = web3.toDecimal(results.peers); self.stats.peers = results.peers;
self.stats.pending = results.pending; self.stats.pending = results.pending;
self.stats.mining = results.mining; self.stats.mining = results.mining;
self.stats.hashrate = results.hashrate; self.stats.hashrate = results.hashrate;
self.stats.gasPrice = web3.toBigNumber(results.gasPrice).toString(10); self.stats.gasPrice = results.gasPrice.toString(10);
} }
else { else {
self.setInactive(); self.setInactive();