Merge pull request #3721 from mempool/mononaut/fix-first-seen
Restore transaction first seen field
This commit is contained in:
		
						commit
						8866923efa
					
				@ -85,7 +85,7 @@
 | 
				
			|||||||
          <div class="col-sm">
 | 
					          <div class="col-sm">
 | 
				
			||||||
            <table class="table table-borderless table-striped">
 | 
					            <table class="table table-borderless table-striped">
 | 
				
			||||||
              <tbody>
 | 
					              <tbody>
 | 
				
			||||||
                <ng-template [ngIf]="transactionTime !== 0 && !replaced">
 | 
					                <ng-template [ngIf]="transactionTime !== 0">
 | 
				
			||||||
                  <tr *ngIf="transactionTime === -1; else firstSeenTmpl">
 | 
					                  <tr *ngIf="transactionTime === -1; else firstSeenTmpl">
 | 
				
			||||||
                    <td><span class="skeleton-loader"></span></td>
 | 
					                    <td><span class="skeleton-loader"></span></td>
 | 
				
			||||||
                    <td><span class="skeleton-loader"></span></td>
 | 
					                    <td><span class="skeleton-loader"></span></td>
 | 
				
			||||||
 | 
				
			|||||||
@ -216,7 +216,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
 | 
				
			|||||||
        this.error = undefined;
 | 
					        this.error = undefined;
 | 
				
			||||||
        this.waitingForTransaction = false;
 | 
					        this.waitingForTransaction = false;
 | 
				
			||||||
        this.graphExpanded = false;
 | 
					        this.graphExpanded = false;
 | 
				
			||||||
        this.transactionTime = 0;
 | 
					        this.transactionTime = tx.firstSeen || 0;
 | 
				
			||||||
        this.setupGraph();
 | 
					        this.setupGraph();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.fetchRbfHistory$.next(this.tx.txid);
 | 
					        this.fetchRbfHistory$.next(this.tx.txid);
 | 
				
			||||||
@ -338,10 +338,10 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
 | 
				
			|||||||
            if (tx.firstSeen) {
 | 
					            if (tx.firstSeen) {
 | 
				
			||||||
              this.transactionTime = tx.firstSeen;
 | 
					              this.transactionTime = tx.firstSeen;
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
              this.transactionTime = 0;
 | 
					              this.getTransactionTime();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          } else {
 | 
					          } else {
 | 
				
			||||||
            this.getTransactionTime();
 | 
					            this.transactionTime = 0;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          if (this.tx?.status?.confirmed) {
 | 
					          if (this.tx?.status?.confirmed) {
 | 
				
			||||||
@ -471,7 +471,9 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy {
 | 
				
			|||||||
    this.apiService
 | 
					    this.apiService
 | 
				
			||||||
      .getTransactionTimes$([this.tx.txid])
 | 
					      .getTransactionTimes$([this.tx.txid])
 | 
				
			||||||
      .subscribe((transactionTimes) => {
 | 
					      .subscribe((transactionTimes) => {
 | 
				
			||||||
 | 
					        if (transactionTimes?.length) {
 | 
				
			||||||
          this.transactionTime = transactionTimes[0];
 | 
					          this.transactionTime = transactionTimes[0];
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user