fixed rounding btc values on homepages
This commit is contained in:
parent
402bd19336
commit
a4a0eef2b0
|
@ -3,6 +3,7 @@
|
||||||
// server-side socket behaviour
|
// server-side socket behaviour
|
||||||
// io is a variable already taken in express
|
// io is a variable already taken in express
|
||||||
var ios = null;
|
var ios = null;
|
||||||
|
var util = require('bitcore/util/util');
|
||||||
|
|
||||||
module.exports.init = function(app, io_ext) {
|
module.exports.init = function(app, io_ext) {
|
||||||
ios = io_ext;
|
ios = io_ext;
|
||||||
|
@ -25,10 +26,10 @@ module.exports.broadcastTx = function(tx) {
|
||||||
// Outputs
|
// Outputs
|
||||||
var valueOut = 0;
|
var valueOut = 0;
|
||||||
t.vout.forEach( function(o) {
|
t.vout.forEach( function(o) {
|
||||||
valueOut += o.value * 100000000;
|
valueOut += o.value * util.COIN;
|
||||||
});
|
});
|
||||||
|
|
||||||
t.valueOut = valueOut / 100000000;
|
t.valueOut = parseInt(valueOut) / util.COIN;
|
||||||
}
|
}
|
||||||
ios.sockets.in('inv').emit('tx', t);
|
ios.sockets.in('inv').emit('tx', t);
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
</td>
|
</td>
|
||||||
<td><span class="ellipsis">{{humanSince(b.time)}}</span></td>
|
<td><span class="ellipsis">{{humanSince(b.time)}}</span></td>
|
||||||
<td class="text-right">{{b.txlength}}</td>
|
<td class="text-right">{{b.txlength}}</td>
|
||||||
<td class="text-right">{{b.size}}</td>
|
<td class="text-right">{{b.size}} bytes</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
Loading…
Reference in New Issue