fix rounding errs at valueOut
This commit is contained in:
parent
280f815f97
commit
9910fa4d40
|
@ -32,11 +32,11 @@ function spec(b) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Outputs
|
// Outputs
|
||||||
var valueOut = 0;
|
var valueOutSat = 0;
|
||||||
info.vout.forEach( function(o) {
|
info.vout.forEach( function(o) {
|
||||||
valueOut += o.value;
|
valueOutSat += o.value * util.COIN;
|
||||||
});
|
});
|
||||||
info.valueOut = valueOut;
|
info.valueOut = parseInt(valueOutSat) / util.COIN;
|
||||||
info.size = b.length;
|
info.size = b.length;
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
|
Loading…
Reference in New Issue