Set outspend fetch limit on transaction level.
This commit is contained in:
parent
550a096749
commit
af86956836
@ -39,13 +39,12 @@ export class TransactionsListComponent implements OnInit, OnChanges {
|
||||
if (this.outspends[i]) {
|
||||
return;
|
||||
}
|
||||
observableObject[i] = this.electrsApiService.getOutspends$(tx.txid);
|
||||
});
|
||||
|
||||
if (Object.keys(observableObject).length > 100) {
|
||||
console.log('Too many outspends requests');
|
||||
if (tx.vin.length + tx.vout.length > 50) {
|
||||
console.log('Too many outspends on transaction: ', tx.txid);
|
||||
return;
|
||||
}
|
||||
observableObject[i] = this.electrsApiService.getOutspends$(tx.txid);
|
||||
});
|
||||
|
||||
forkJoin(observableObject)
|
||||
.subscribe((outspends: any) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user