diff --git a/lib/Rpc.js b/lib/Rpc.js index 3d8f3e024..a71c3969a 100644 --- a/lib/Rpc.js +++ b/lib/Rpc.js @@ -31,10 +31,10 @@ Rpc._parseTxResult = function(info) { var valueOutSat = 0; info.vout.forEach( function(o) { o.value = o.value.toFixed(8); - valueOutSat += (o.value * bitcore.util.COIN).toFixed(0); + valueOutSat += o.value * bitcore.util.COIN; delete o.scriptPubKey.hex; }); - info.valueOut = valueOutSat / bitcore.util.COIN; + info.valueOut = valueOutSat.toFixed(0) / bitcore.util.COIN; info.size = b.length; return info;