Fix spam call to /api/v1/mining/pool/{slug}
This commit is contained in:
parent
fb0e7ec240
commit
a20c401c83
@ -20,7 +20,7 @@ export class PoolComponent implements OnInit {
|
|||||||
@Input() left: number | string = 75;
|
@Input() left: number | string = 75;
|
||||||
|
|
||||||
gfg = true;
|
gfg = true;
|
||||||
|
|
||||||
formatNumber = formatNumber;
|
formatNumber = formatNumber;
|
||||||
poolStats$: Observable<PoolStat>;
|
poolStats$: Observable<PoolStat>;
|
||||||
blocks$: Observable<BlockExtended[]>;
|
blocks$: Observable<BlockExtended[]>;
|
||||||
@ -56,12 +56,12 @@ export class PoolComponent implements OnInit {
|
|||||||
switchMap((data) => {
|
switchMap((data) => {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.prepareChartOptions(data.hashrates.map(val => [val.timestamp * 1000, val.avgHashrate]));
|
this.prepareChartOptions(data.hashrates.map(val => [val.timestamp * 1000, val.avgHashrate]));
|
||||||
return slug;
|
return [slug];
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
switchMap(() => {
|
switchMap((slug) => {
|
||||||
return this.apiService.getPoolStats$(this.slug);
|
return this.apiService.getPoolStats$(slug);
|
||||||
}),
|
}),
|
||||||
map((poolStats) => {
|
map((poolStats) => {
|
||||||
let regexes = '"';
|
let regexes = '"';
|
||||||
@ -124,7 +124,7 @@ export class PoolComponent implements OnInit {
|
|||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
borderColor: '#000',
|
borderColor: '#000',
|
||||||
formatter: function(ticks: any[]) {
|
formatter: function (ticks: any[]) {
|
||||||
let hashratePowerOfTen: any = selectPowerOfTen(1);
|
let hashratePowerOfTen: any = selectPowerOfTen(1);
|
||||||
let hashrate = ticks[0].data[1];
|
let hashrate = ticks[0].data[1];
|
||||||
|
|
||||||
@ -192,14 +192,14 @@ export class PoolComponent implements OnInit {
|
|||||||
bottom: 0,
|
bottom: 0,
|
||||||
left: 20,
|
left: 20,
|
||||||
right: 15,
|
right: 15,
|
||||||
selectedDataBackground: {
|
selectedDataBackground: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#fff',
|
color: '#fff',
|
||||||
opacity: 0.45,
|
opacity: 0.45,
|
||||||
},
|
},
|
||||||
areaStyle: {
|
areaStyle: {
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user