Batch esplora outspends requests

This commit is contained in:
Mononaut committed 2023-11-12 07:03:28 +00:00
1 parent 823f06451c
commit 8aa51c4e80
6 files changed
+38 -20

No files matched your search

@@ -8,6 +8,7 @@ import { ApiService } from '../../services/api.service';
import { RelativeUrlPipe } from '../../shared/pipes/relative-url/relative-url.pipe';
import { AssetsService } from '../../services/assets.service';
import { environment } from '../../../environments/environment';
import { ElectrsApiService } from '../../services/electrs-api.service';
interface SvgLine {
path: string;
@@ -100,7 +101,7 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
private router: Router,
private relativeUrlPipe: RelativeUrlPipe,
private stateService: StateService,
private apiService: ApiService,
private electrsApiService: ElectrsApiService,
private assetsService: AssetsService,
@Inject(LOCALE_ID) private locale: string,
) {
@@ -123,7 +124,7 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
.pipe(
switchMap((txid) => {
if (!this.cached) {
return this.apiService.cachedRequest(this.apiService.getOutspendsBatched$, 250, [txid]);
return this.electrsApiService.getOutspendsBatched$([txid]);
} else {
return of(null);
}