Skip to content

Commit

Permalink
fix valOut
Browse files Browse the repository at this point in the history
  • Loading branch information
matiu committed May 17, 2014
1 parent f537db4 commit 7b7d086
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7b7d086

Please sign in to comment.