Merge pull request #5558 from mempool/mononaut/handle-utxo-error
handle /utxos error on address page
This commit is contained in:
commit
72c9d02f88
@ -219,9 +219,13 @@ export class AddressComponent implements OnInit, OnDestroy {
|
|||||||
address.is_pubkey
|
address.is_pubkey
|
||||||
? this.electrsApiService.getScriptHashTransactions$((address.address.length === 66 ? '21' : '41') + address.address + 'ac')
|
? this.electrsApiService.getScriptHashTransactions$((address.address.length === 66 ? '21' : '41') + address.address + 'ac')
|
||||||
: this.electrsApiService.getAddressTransactions$(address.address),
|
: 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.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]) => {
|
switchMap(([transactions, utxos]) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user