Prevent address txs widget to send too many price requests

This commit is contained in:
natsoni 2024-06-12 20:02:54 +02:00
parent 60a30aaede
commit 2156924d7e
No known key found for this signature in database
GPG key ID: C65917583181743B

View file

@ -58,7 +58,7 @@ export class AddressTransactionsWidgetComponent implements OnInit, OnChanges, On
return summary?.slice(0, 6); return summary?.slice(0, 6);
}), }),
switchMap(txs => { switchMap(txs => {
return (zip(txs.map(tx => this.priceService.getBlockPrice$(tx.time, true, this.currency).pipe( return (zip(txs.map(tx => this.priceService.getBlockPrice$(tx.time, txs.length < 3, this.currency).pipe(
map(price => { map(price => {
return { return {
...tx, ...tx,