Merge pull request #4545 from mempool/simon/block-view-accel-flag-check-fix

Acceleration flag check on block/tx view
This commit is contained in:
softsimon 2024-01-02 23:18:55 +07:00 committed by GitHub
commit 0c956be136
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -134,7 +134,7 @@ export class BlockPreviewComponent implements OnInit, OnDestroy {
return of(transactions); return of(transactions);
}) })
), ),
block.height > 819500 ? this.apiService.getAccelerationHistory$({ blockHash: block.id }) : of([]) this.stateService.env.ACCELERATOR === true && block.height > 819500 ? this.apiService.getAccelerationHistory$({ blockHash: block.id }) : of([])
]); ]);
} }
), ),

View File

@ -329,7 +329,7 @@ export class BlockComponent implements OnInit, OnDestroy {
return of(null); return of(null);
}) })
), ),
block.height > 819500 ? this.apiService.getAccelerationHistory$({ blockHash: block.id }) : of([]) this.stateService.env.ACCELERATOR === true && block.height > 819500 ? this.apiService.getAccelerationHistory$({ blockHash: block.id }) : of([])
]); ]);
}) })
) )

View File

@ -242,6 +242,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
}); });
this.fetchAccelerationSubscription = this.fetchAcceleration$.pipe( this.fetchAccelerationSubscription = this.fetchAcceleration$.pipe(
filter(() => this.stateService.env.ACCELERATOR === true),
tap(() => { tap(() => {
this.accelerationInfo = null; this.accelerationInfo = null;
}), }),