From b32cce1440d6409b05776ed72b84c796c3546b64 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Tue, 2 Apr 2024 08:23:38 +0000 Subject: [PATCH] Restrict public acceleration APIs to mainnet --- frontend/src/app/components/block/block.component.ts | 2 +- frontend/src/app/components/pool/pool.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/block/block.component.ts b/frontend/src/app/components/block/block.component.ts index 1ef2513ca..13b0ecd76 100644 --- a/frontend/src/app/components/block/block.component.ts +++ b/frontend/src/app/components/block/block.component.ts @@ -484,7 +484,7 @@ export class BlockComponent implements OnInit, OnDestroy { }); this.oobSubscription = block$.pipe( - filter(() => this.stateService.env.PUBLIC_ACCELERATIONS === true), + filter(() => this.stateService.env.PUBLIC_ACCELERATIONS === true && this.stateService.network === ''), switchMap((block) => this.apiService.getAccelerationsByHeight$(block.height) .pipe( map(accelerations => { diff --git a/frontend/src/app/components/pool/pool.component.ts b/frontend/src/app/components/pool/pool.component.ts index bf3ce84e6..8626c633a 100644 --- a/frontend/src/app/components/pool/pool.component.ts +++ b/frontend/src/app/components/pool/pool.component.ts @@ -121,7 +121,7 @@ export class PoolComponent implements OnInit { ); this.oobFees$ = this.route.params.pipe(map((params) => params.slug)).pipe( - filter(() => this.stateService.env.PUBLIC_ACCELERATIONS === true), + filter(() => this.stateService.env.PUBLIC_ACCELERATIONS === true && this.stateService.network === ''), switchMap(slug => { return combineLatest([ this.apiService.getAccelerationTotals$(this.slug, '1w'),