Merge pull request #5534 from mempool/natsoni/mining-1m
Only fetch 1m mining stats
This commit is contained in:
		
						commit
						8867ef9680
					
				| @ -192,7 +192,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { | |||||||
|     this.hideAccelerationSummary = this.stateService.isMempoolSpaceBuild ? this.storageService.getValue('hide-accelerator-pref') == 'true' : true; |     this.hideAccelerationSummary = this.stateService.isMempoolSpaceBuild ? this.storageService.getValue('hide-accelerator-pref') == 'true' : true; | ||||||
| 
 | 
 | ||||||
|     if (!this.stateService.isLiquid()) { |     if (!this.stateService.isLiquid()) { | ||||||
|       this.miningService.getMiningStats('1w').subscribe(stats => { |       this.miningService.getMiningStats('1m').subscribe(stats => { | ||||||
|         this.miningStats = stats; |         this.miningStats = stats; | ||||||
|       }); |       }); | ||||||
|     } |     } | ||||||
| @ -491,7 +491,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { | |||||||
|           if (this.stateService.network === '') { |           if (this.stateService.network === '') { | ||||||
|             if (!this.mempoolPosition.accelerated) { |             if (!this.mempoolPosition.accelerated) { | ||||||
|               if (!this.accelerationFlowCompleted && !this.hideAccelerationSummary && !this.showAccelerationSummary) { |               if (!this.accelerationFlowCompleted && !this.hideAccelerationSummary && !this.showAccelerationSummary) { | ||||||
|                 this.miningService.getMiningStats('1w').subscribe(stats => { |                 this.miningService.getMiningStats('1m').subscribe(stats => { | ||||||
|                   this.miningStats = stats; |                   this.miningStats = stats; | ||||||
|                 }); |                 }); | ||||||
|               } |               } | ||||||
|  | |||||||
| @ -28,7 +28,7 @@ export class EtaService { | |||||||
|     return combineLatest([ |     return combineLatest([ | ||||||
|       this.stateService.mempoolTxPosition$.pipe(map(p => p?.position)), |       this.stateService.mempoolTxPosition$.pipe(map(p => p?.position)), | ||||||
|       this.stateService.difficultyAdjustment$, |       this.stateService.difficultyAdjustment$, | ||||||
|       miningStats ? of(miningStats) : this.miningService.getMiningStats('1w'), |       miningStats ? of(miningStats) : this.miningService.getMiningStats('1m'), | ||||||
|     ]).pipe( |     ]).pipe( | ||||||
|       map(([mempoolPosition, da, miningStats]) => { |       map(([mempoolPosition, da, miningStats]) => { | ||||||
|         if (!mempoolPosition || !estimate?.pools?.length || !miningStats || !da) { |         if (!mempoolPosition || !estimate?.pools?.length || !miningStats || !da) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user