fix valOut

This commit is contained in:
Matias Alejo Garcia 2014-05-17 18:48:54 -03:00
parent f537db469e
commit 7b7d0868f0
1 changed files with 2 additions and 2 deletions

View File

@ -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;