From 7b7d0868f0de6d67ffbbbe4cad8f134529cddea1 Mon Sep 17 00:00:00 2001 From: Matias Alejo Garcia Date: Sat, 17 May 2014 18:48:54 -0300 Subject: [PATCH] fix valOut --- lib/Rpc.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;