Add electrsApiService cachedRequest function, switch outspends

This commit is contained in:
Mononaut
2023-11-12 06:38:18 +00:00
parent 8aa51c4e80
commit 09f208484a
3 changed files with 45 additions and 3 deletions

View File

@@ -124,7 +124,7 @@ export class TxBowtieGraphComponent implements OnInit, OnChanges {
.pipe(
switchMap((txid) => {
if (!this.cached) {
return this.electrsApiService.getOutspendsBatched$([txid]);
return this.electrsApiService.cachedRequest(this.electrsApiService.getOutspendsBatched$, 250, [txid]);
} else {
return of(null);
}