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