From 03ade97c0eac2b6c2a052b35152c2a5cf8017e11 Mon Sep 17 00:00:00 2001 From: nymkappa Date: Thu, 23 Jun 2022 15:30:42 +0200 Subject: [PATCH] Fix double http query when switching timespan for the first time --- .../block-fee-rates-graph/block-fee-rates-graph.component.ts | 2 +- .../components/block-fees-graph/block-fees-graph.component.ts | 2 +- .../block-rewards-graph/block-rewards-graph.component.ts | 2 +- .../block-sizes-weights-graph.component.ts | 2 +- .../app/components/hashrate-chart/hashrate-chart.component.ts | 2 +- .../hashrates-chart-pools/hashrate-chart-pools.component.ts | 2 +- .../src/app/components/pool-ranking/pool-ranking.component.ts | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts b/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts index b483f5921..e5ee42608 100644 --- a/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts +++ b/frontend/src/app/components/block-fee-rates-graph/block-fee-rates-graph.component.ts @@ -72,7 +72,7 @@ export class BlockFeeRatesGraphComponent implements OnInit { .fragment .subscribe((fragment) => { if (['24h', '3d', '1w', '1m', '3m', '6m', '1y', '2y', '3y', 'all'].indexOf(fragment) > -1) { - this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: true }); + this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: false }); } }); diff --git a/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts b/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts index 7e79ed3fd..1a74416e7 100644 --- a/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts +++ b/frontend/src/app/components/block-fees-graph/block-fees-graph.component.ts @@ -66,7 +66,7 @@ export class BlockFeesGraphComponent implements OnInit { .fragment .subscribe((fragment) => { if (['24h', '3d', '1w', '1m', '3m', '6m', '1y', '2y', '3y', 'all'].indexOf(fragment) > -1) { - this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: true }); + this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: false }); } }); diff --git a/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts b/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts index dbea4bc26..995fb31fb 100644 --- a/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts +++ b/frontend/src/app/components/block-rewards-graph/block-rewards-graph.component.ts @@ -64,7 +64,7 @@ export class BlockRewardsGraphComponent implements OnInit { .fragment .subscribe((fragment) => { if (['24h', '3d', '1w', '1m', '3m', '6m', '1y', '2y', '3y', 'all'].indexOf(fragment) > -1) { - this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: true }); + this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: false }); } }); diff --git a/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts b/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts index 1cbfc44aa..cf6591548 100644 --- a/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts +++ b/frontend/src/app/components/block-sizes-weights-graph/block-sizes-weights-graph.component.ts @@ -68,7 +68,7 @@ export class BlockSizesWeightsGraphComponent implements OnInit { .fragment .subscribe((fragment) => { if (['24h', '3d', '1w', '1m', '3m', '6m', '1y', '2y', '3y', 'all'].indexOf(fragment) > -1) { - this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: true }); + this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: false }); } }); diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts index b294927ba..900d6399d 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.ts @@ -76,7 +76,7 @@ export class HashrateChartComponent implements OnInit { .fragment .subscribe((fragment) => { if (['1m', '3m', '6m', '1y', '2y', '3y', 'all'].indexOf(fragment) > -1) { - this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: true }); + this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: false }); } }); diff --git a/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts b/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts index 1c256d0a5..716fc3216 100644 --- a/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts +++ b/frontend/src/app/components/hashrates-chart-pools/hashrate-chart-pools.component.ts @@ -70,7 +70,7 @@ export class HashrateChartPoolsComponent implements OnInit { .fragment .subscribe((fragment) => { if (['6m', '1y', '2y', '3y', 'all'].indexOf(fragment) > -1) { - this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: true }); + this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: false }); } }); diff --git a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts index 61c250a1e..f52a8ae74 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts @@ -63,7 +63,7 @@ export class PoolRankingComponent implements OnInit { .fragment .subscribe((fragment) => { if (['24h', '3d', '1w', '1m', '3m', '6m', '1y', '2y', '3y', 'all'].indexOf(fragment) > -1) { - this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: true }); + this.radioGroupForm.controls.dateSpan.setValue(fragment, { emitEvent: false }); } });