Reduce outspend API cache expiry to 250ms
This commit is contained in:
parent
3f0c3c1952
commit
6740ab61f3
@ -53,7 +53,6 @@ export class TransactionsListComponent implements OnInit, OnChanges {
|
||||
private assetsService: AssetsService,
|
||||
private ref: ChangeDetectorRef,
|
||||
private priceService: PriceService,
|
||||
private cd: ChangeDetectorRef,
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
@ -76,7 +75,7 @@ export class TransactionsListComponent implements OnInit, OnChanges {
|
||||
for (let i = 0; i < txIds.length; i += 50) {
|
||||
batches.push(txIds.slice(i, i + 50));
|
||||
}
|
||||
return forkJoin(batches.map(batch => { return this.apiService.cachedRequest(this.apiService.getOutspendsBatched$, 5000, batch); }));
|
||||
return forkJoin(batches.map(batch => { return this.apiService.cachedRequest(this.apiService.getOutspendsBatched$, 250, batch); }));
|
||||
} else {
|
||||
return of([]);
|
||||
}
|
||||
@ -91,7 +90,7 @@ export class TransactionsListComponent implements OnInit, OnChanges {
|
||||
outspends.forEach((outspend, i) => {
|
||||
transactions[i]._outspends = outspend;
|
||||
});
|
||||
this.cd.markForCheck();
|
||||
this.ref.markForCheck();
|
||||
}),
|
||||
),
|
||||
this.stateService.utxoSpent$
|
||||
|
@ -123,7 +123,7 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
|
||||
.pipe(
|
||||
switchMap((txid) => {
|
||||
if (!this.cached) {
|
||||
return this.apiService.cachedRequest(this.apiService.getOutspendsBatched$, 5000, [txid]);
|
||||
return this.apiService.cachedRequest(this.apiService.getOutspendsBatched$, 250, [txid]);
|
||||
} else {
|
||||
return of(null);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user