diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index c5a683c76..9ce22d26c 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -481,7 +481,7 @@ First seen - } @else { + } @else if (isLoadingFirstSeen) { First seen diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index 5e010b8e0..fef98d414 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -133,6 +133,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { isMobile: boolean; firstLoad = true; waitingForAccelerationInfo: boolean = false; + isLoadingFirstSeen = false; featuresEnabled: boolean; segwitEnabled: boolean; @@ -763,8 +764,16 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { } getTransactionTime() { + this.isLoadingFirstSeen = true; this.apiService .getTransactionTimes$([this.tx.txid]) + .pipe( + retry({ count: 2, delay: 2000 }), + catchError(() => { + this.isLoadingFirstSeen = false; + return throwError(() => new Error('')); + }) + ) .subscribe((transactionTimes) => { if (transactionTimes?.length && transactionTimes[0]) { this.transactionTime = transactionTimes[0];