handle /utxos error on address page

This commit is contained in:
Mononaut 2024-09-29 09:30:09 +00:00
parent 5b73362e44
commit 60adad8db3
No known key found for this signature in database
GPG Key ID: A3F058E41374C04E

View File

@ -219,9 +219,13 @@ export class AddressComponent implements OnInit, OnDestroy {
address.is_pubkey
? this.electrsApiService.getScriptHashTransactions$((address.address.length === 66 ? '21' : '41') + address.address + 'ac')
: this.electrsApiService.getAddressTransactions$(address.address),
utxoCount >= 2 && utxoCount <= 500 ? (address.is_pubkey
(utxoCount >= 2 && utxoCount <= 500 ? (address.is_pubkey
? this.electrsApiService.getScriptHashUtxos$((address.address.length === 66 ? '21' : '41') + address.address + 'ac')
: this.electrsApiService.getAddressUtxos$(address.address)) : of([])
: this.electrsApiService.getAddressUtxos$(address.address)) : of([])).pipe(
catchError(() => {
return of([]);
})
)
]);
}),
switchMap(([transactions, utxos]) => {