From 89de288fec347e116a4ef120c648bd4a50bb4621 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Thu, 11 Apr 2024 03:56:05 +0000 Subject: [PATCH 1/2] it hasn't been 54 years since this transaction was submitted --- .../components/transaction/transaction.component.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index 55f7047e6..9f805e4e7 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -460,16 +460,16 @@ @if (isLoadingTx) { + } @else if (transactionTime > 0) { + + First seen + + } @else if (transactionTime === -1) { First seen - } @else { - - First seen - - } From fa9aaf0423959b340ba30b707c4b454b80d2a750 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Thu, 11 Apr 2024 06:03:14 +0000 Subject: [PATCH 2/2] Keep firstSeen loader, retry on fail --- .../app/components/transaction/transaction.component.html | 2 +- .../src/app/components/transaction/transaction.component.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index 9f805e4e7..d42034af1 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -465,7 +465,7 @@ First seen - } @else if (transactionTime === -1) { + } @else { First seen diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index 158d56c7d..b6caf38d0 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -656,8 +656,12 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { this.apiService .getTransactionTimes$([this.tx.txid]) .subscribe((transactionTimes) => { - if (transactionTimes?.length) { + if (transactionTimes?.length && transactionTimes[0]) { this.transactionTime = transactionTimes[0]; + } else { + setTimeout(() => { + this.getTransactionTime(); + }, 2000); } }); }