Merge pull request #5558 from mempool/mononaut/handle-utxo-error

handle /utxos error on address page
This commit is contained in:
softsimon 2024-10-01 12:01:55 -07:00 committed by GitHub
commit 72c9d02f88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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]) => {