Skip to content

Commit

Permalink
Fixed market data display issue
Browse files Browse the repository at this point in the history
  • Loading branch information
zone117x committed Jun 24, 2014
1 parent ce8aeea commit abcf7c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,10 @@
$('.marketTicker').remove();
for (var f = marketsData.length - 1; f >= 0 ; f--){
var price = parseFloat(marketsData[f].ticker.price);

if (price > 1) price = Math.round(price * 100) / 100;
else price = marketsData[f].ticker.price;

$marketHeader.after('<div class="marketTicker">' + marketsData[f].ticker.base + ': <span>' + price + ' ' + marketsData[f].ticker.target + '</span></div>');
}
$('#marketLastUpdated').timeago('update', new Date(marketsData[0].timestamp * 1000).toISOString());
Expand Down

0 comments on commit abcf7c7

Please sign in to comment.