Merge pull request #1685 from mempool/nymkappa/feature/update-api-case
Update case in some mining API endpoint response
This commit is contained in:
@@ -89,13 +89,13 @@ export class BlockFeeRatesGraphComponent implements OnInit {
|
||||
};
|
||||
for (const rate of data.blockFeeRates) {
|
||||
const timestamp = rate.timestamp * 1000;
|
||||
seriesData['Min'].push([timestamp, rate.avg_fee_0, rate.avg_height]);
|
||||
seriesData['10th'].push([timestamp, rate.avg_fee_10, rate.avg_height]);
|
||||
seriesData['25th'].push([timestamp, rate.avg_fee_25, rate.avg_height]);
|
||||
seriesData['Median'].push([timestamp, rate.avg_fee_50, rate.avg_height]);
|
||||
seriesData['75th'].push([timestamp, rate.avg_fee_75, rate.avg_height]);
|
||||
seriesData['90th'].push([timestamp, rate.avg_fee_90, rate.avg_height]);
|
||||
seriesData['Max'].push([timestamp, rate.avg_fee_100, rate.avg_height]);
|
||||
seriesData['Min'].push([timestamp, rate.avgFee_0, rate.avgHeight]);
|
||||
seriesData['10th'].push([timestamp, rate.avgFee_10, rate.avgHeight]);
|
||||
seriesData['25th'].push([timestamp, rate.avgFee_25, rate.avgHeight]);
|
||||
seriesData['Median'].push([timestamp, rate.avgFee_50, rate.avgHeight]);
|
||||
seriesData['75th'].push([timestamp, rate.avgFee_75, rate.avgHeight]);
|
||||
seriesData['90th'].push([timestamp, rate.avgFee_90, rate.avgHeight]);
|
||||
seriesData['Max'].push([timestamp, rate.avgFee_100, rate.avgHeight]);
|
||||
}
|
||||
|
||||
// Prepare chart
|
||||
|
||||
@@ -71,7 +71,7 @@ export class BlockFeesGraphComponent implements OnInit {
|
||||
.pipe(
|
||||
tap((response) => {
|
||||
this.prepareChartOptions({
|
||||
blockFees: response.body.map(val => [val.timestamp * 1000, val.avg_fees / 100000000]),
|
||||
blockFees: response.body.map(val => [val.timestamp * 1000, val.avgFees / 100000000]),
|
||||
});
|
||||
this.isLoading = false;
|
||||
}),
|
||||
|
||||
@@ -69,7 +69,7 @@ export class BlockRewardsGraphComponent implements OnInit {
|
||||
.pipe(
|
||||
tap((response) => {
|
||||
this.prepareChartOptions({
|
||||
blockRewards: response.body.map(val => [val.timestamp * 1000, val.avg_rewards / 100000000]),
|
||||
blockRewards: response.body.map(val => [val.timestamp * 1000, val.avgRewards / 100000000]),
|
||||
});
|
||||
this.isLoading = false;
|
||||
}),
|
||||
|
||||
@@ -83,8 +83,8 @@ export class BlockSizesWeightsGraphComponent implements OnInit {
|
||||
tap((response) => {
|
||||
const data = response.body;
|
||||
this.prepareChartOptions({
|
||||
sizes: data.sizes.map(val => [val.timestamp * 1000, val.avg_size / 1000000, val.avg_height]),
|
||||
weights: data.weights.map(val => [val.timestamp * 1000, val.avg_weight / 1000000, val.avg_height]),
|
||||
sizes: data.sizes.map(val => [val.timestamp * 1000, val.avgSize / 1000000, val.avgHeight]),
|
||||
weights: data.weights.map(val => [val.timestamp * 1000, val.avgWeight / 1000000, val.avgHeight]),
|
||||
});
|
||||
this.isLoading = false;
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user