[refactoring] move servics related api calls to its own service

This commit is contained in:
nymkappa
2023-12-12 17:24:58 +01:00
parent 38479db5ca
commit 2013dc6d8b
11 changed files with 181 additions and 99 deletions

View File

@@ -7,7 +7,6 @@ import {
catchError,
retryWhen,
delay,
map,
mergeMap,
tap
} from 'rxjs/operators';
@@ -26,6 +25,7 @@ import { LiquidUnblinding } from './liquid-ublinding';
import { RelativeUrlPipe } from '../../shared/pipes/relative-url/relative-url.pipe';
import { Price, PriceService } from '../../services/price.service';
import { isFeatureActive } from '../../bitcoin.utils';
import { ServicesApiServices } from '../../services/services-api.service';
@Component({
selector: 'app-transaction',
@@ -113,6 +113,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
private websocketService: WebsocketService,
private audioService: AudioService,
private apiService: ApiService,
private servicesApiService: ServicesApiServices,
private seoService: SeoService,
private priceService: PriceService,
private storageService: StorageService
@@ -246,7 +247,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
this.accelerationInfo = null;
}),
switchMap((blockHash: string) => {
return this.apiService.getAccelerationHistory$({ blockHash });
return this.servicesApiService.getAccelerationHistory$({ blockHash });
}),
catchError(() => {
return of(null);