Merge pull request #4865 from mempool/mononaut/public-acceleration-config

Public acceleration config
This commit is contained in:
wiz
2024-04-03 16:16:36 +09:00
committed by GitHub
6 changed files with 10 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ import { Component, OnInit, OnDestroy, ViewChildren, QueryList, Inject, PLATFORM
import { Location } from '@angular/common';
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
import { ElectrsApiService } from '../../services/electrs-api.service';
import { switchMap, tap, throttleTime, catchError, map, shareReplay, startWith } from 'rxjs/operators';
import { switchMap, tap, throttleTime, catchError, map, shareReplay, startWith, filter } from 'rxjs/operators';
import { Transaction, Vout } from '../../interfaces/electrs.interface';
import { Observable, of, Subscription, asyncScheduler, EMPTY, combineLatest, forkJoin } from 'rxjs';
import { StateService } from '../../services/state.service';
@@ -484,6 +484,7 @@ export class BlockComponent implements OnInit, OnDestroy {
});
this.oobSubscription = block$.pipe(
filter(() => this.stateService.env.PUBLIC_ACCELERATIONS === true && this.stateService.network === ''),
switchMap((block) => this.apiService.getAccelerationsByHeight$(block.height)
.pipe(
map(accelerations => {

View File

@@ -121,6 +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 && this.stateService.network === ''),
switchMap(slug => {
return combineLatest([
this.apiService.getAccelerationTotals$(this.slug, '1w'),