From 06ef1143952cb648b5b9dae66ef7aa9246add9d9 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Fri, 5 May 2023 15:12:05 -0700 Subject: [PATCH] Restore transaction first seen field --- .../components/transaction/transaction.component.html | 2 +- .../components/transaction/transaction.component.ts | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/app/components/transaction/transaction.component.html b/frontend/src/app/components/transaction/transaction.component.html index 5580c8ea4..7afbfd20b 100644 --- a/frontend/src/app/components/transaction/transaction.component.html +++ b/frontend/src/app/components/transaction/transaction.component.html @@ -85,7 +85,7 @@
- + diff --git a/frontend/src/app/components/transaction/transaction.component.ts b/frontend/src/app/components/transaction/transaction.component.ts index bf1e0f144..3bfc8400a 100644 --- a/frontend/src/app/components/transaction/transaction.component.ts +++ b/frontend/src/app/components/transaction/transaction.component.ts @@ -216,7 +216,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { this.error = undefined; this.waitingForTransaction = false; this.graphExpanded = false; - this.transactionTime = 0; + this.transactionTime = tx.firstSeen || 0; this.setupGraph(); this.fetchRbfHistory$.next(this.tx.txid); @@ -338,10 +338,10 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { if (tx.firstSeen) { this.transactionTime = tx.firstSeen; } else { - this.transactionTime = 0; + this.getTransactionTime(); } } else { - this.getTransactionTime(); + this.transactionTime = 0; } if (this.tx?.status?.confirmed) { @@ -471,7 +471,9 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { this.apiService .getTransactionTimes$([this.tx.txid]) .subscribe((transactionTimes) => { - this.transactionTime = transactionTimes[0]; + if (transactionTimes?.length) { + this.transactionTime = transactionTimes[0]; + } }); }