Merge pull request #4948 from mempool/mononaut/54-years

it hasn't been 54 years since this transaction was submitted
This commit is contained in:
softsimon 2024-04-11 15:54:39 +09:00 committed by GitHub
commit df0da605e4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View File

@ -460,15 +460,15 @@
<ng-template #firstSeenRow>
@if (isLoadingTx) {
<ng-container *ngTemplateOutlet="skeletonDetailsRow"></ng-container>
} @else if (transactionTime === -1) {
} @else if (transactionTime > 0) {
<tr>
<td i18n="transaction.first-seen|Transaction first seen">First seen</td>
<td><span class="skeleton-loader"></span></td>
<td><i><app-time kind="since" [time]="transactionTime" [fastRender]="true"></app-time></i></td>
</tr>
} @else {
<tr>
<td i18n="transaction.first-seen|Transaction first seen">First seen</td>
<td><i><app-time kind="since" [time]="transactionTime" [fastRender]="true"></app-time></i></td>
<td><span class="skeleton-loader"></span></td>
</tr>
}
</ng-template>

View File

@ -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);
}
});
}