Fix mining chart #48
1 changed files with 1 additions and 2 deletions
|
@ -85,7 +85,6 @@ function buildChartData(blockData) {
|
||||||
inflationRate = ((supply - lastYearSupply) / lastYearSupply) * 100;
|
inflationRate = ((supply - lastYearSupply) / lastYearSupply) * 100;
|
||||||
if(i % skip == 0) { // Only push 1/<skip> of all blocks to optimize data loading
|
if(i % skip == 0) { // Only push 1/<skip> of all blocks to optimize data loading
|
||||||
chartData.push({
|
chartData.push({
|
||||||
date: new Date(blockTime * 1000),
|
|
||||||
date: new Date(blockTime * 1000),
|
date: new Date(blockTime * 1000),
|
||||||
AvailableSupply: supply,
|
AvailableSupply: supply,
|
||||||
RewardLBC: reward,
|
RewardLBC: reward,
|
||||||
|
@ -99,7 +98,7 @@ function buildChartData(blockData) {
|
||||||
|
|
||||||
function loadChartData() {
|
function loadChartData() {
|
||||||
var api_url = "https://chainquery.lbry.io/api/sql?query=";
|
var api_url = "https://chainquery.lbry.io/api/sql?query=";
|
||||||
var query = "SELECT id, block_time FROM block";
|
var query = "SELECT height, block_time FROM block WHERE confirmations > 0 ORDER BY height";
|
||||||
var url = api_url + query;
|
var url = api_url + query;
|
||||||
var loadProgress = $('.mining-inflation-chart-container .load-progress');
|
var loadProgress = $('.mining-inflation-chart-container .load-progress');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
Loading…
Reference in a new issue