From 60adad8db37eb398c8a2b7cf6e621b536001bce8 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Sun, 29 Sep 2024 09:30:09 +0000 Subject: [PATCH] handle /utxos error on address page --- frontend/src/app/components/address/address.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/address/address.component.ts b/frontend/src/app/components/address/address.component.ts index aaf480d8e..be6d531c0 100644 --- a/frontend/src/app/components/address/address.component.ts +++ b/frontend/src/app/components/address/address.component.ts @@ -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]) => {