From 2907054a01945d5a13bcd8c540d7d6a71098fec8 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Wed, 8 Mar 2023 02:14:41 -0600 Subject: [PATCH] Update pool ranking block count when new blocks arrive --- .../app/components/pool-ranking/pool-ranking.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 a3f23c031..0f2103024 100644 --- a/frontend/src/app/components/pool-ranking/pool-ranking.component.ts +++ b/frontend/src/app/components/pool-ranking/pool-ranking.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectionStrategy, Component, Input, NgZone, OnInit, HostBinding import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; import { ActivatedRoute, Router } from '@angular/router'; import { EChartsOption, PieSeriesOption } from 'echarts'; -import { concat, Observable } from 'rxjs'; +import { merge, Observable } from 'rxjs'; import { map, share, startWith, switchMap, tap } from 'rxjs/operators'; import { SeoService } from '../../services/seo.service'; import { StorageService } from '../..//services/storage.service'; @@ -73,7 +73,7 @@ export class PoolRankingComponent implements OnInit { } }); - this.miningStatsObservable$ = concat( + this.miningStatsObservable$ = merge( this.radioGroupForm.get('dateSpan').valueChanges .pipe( startWith(this.radioGroupForm.controls.dateSpan.value), // (trigger when the page loads) @@ -89,7 +89,7 @@ export class PoolRankingComponent implements OnInit { return this.miningService.getMiningStats(this.miningWindowPreference); }) ), - this.stateService.blocks$ + this.stateService.chainTip$ .pipe( switchMap(() => { return this.miningService.getMiningStats(this.miningWindowPreference);