parent
							
								
									6177b97bd1
								
							
						
					
					
						commit
						9cba7ccf75
					
				| @ -481,7 +481,7 @@ | |||||||
|       <td i18n="transaction.first-seen|Transaction first seen">First seen</td> |       <td i18n="transaction.first-seen|Transaction first seen">First seen</td> | ||||||
|       <td><i><app-time kind="since" [time]="transactionTime" [fastRender]="true" [showTooltip]="true"></app-time></i></td> |       <td><i><app-time kind="since" [time]="transactionTime" [fastRender]="true" [showTooltip]="true"></app-time></i></td> | ||||||
|     </tr> |     </tr> | ||||||
|   } @else { |   } @else if (isLoadingFirstSeen) { | ||||||
|     <tr> |     <tr> | ||||||
|       <td i18n="transaction.first-seen|Transaction first seen">First seen</td> |       <td i18n="transaction.first-seen|Transaction first seen">First seen</td> | ||||||
|       <td><span class="skeleton-loader"></span></td> |       <td><span class="skeleton-loader"></span></td> | ||||||
|  | |||||||
| @ -133,6 +133,7 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { | |||||||
|   isMobile: boolean; |   isMobile: boolean; | ||||||
|   firstLoad = true; |   firstLoad = true; | ||||||
|   waitingForAccelerationInfo: boolean = false; |   waitingForAccelerationInfo: boolean = false; | ||||||
|  |   isLoadingFirstSeen = false; | ||||||
| 
 | 
 | ||||||
|   featuresEnabled: boolean; |   featuresEnabled: boolean; | ||||||
|   segwitEnabled: boolean; |   segwitEnabled: boolean; | ||||||
| @ -763,8 +764,16 @@ export class TransactionComponent implements OnInit, AfterViewInit, OnDestroy { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   getTransactionTime() { |   getTransactionTime() { | ||||||
|  |     this.isLoadingFirstSeen = true; | ||||||
|     this.apiService |     this.apiService | ||||||
|       .getTransactionTimes$([this.tx.txid]) |       .getTransactionTimes$([this.tx.txid]) | ||||||
|  |       .pipe( | ||||||
|  |         retry({ count: 2, delay: 2000 }), | ||||||
|  |         catchError(() => { | ||||||
|  |           this.isLoadingFirstSeen = false; | ||||||
|  |           return throwError(() => new Error('')); | ||||||
|  |         }) | ||||||
|  |       ) | ||||||
|       .subscribe((transactionTimes) => { |       .subscribe((transactionTimes) => { | ||||||
|         if (transactionTimes?.length && transactionTimes[0]) { |         if (transactionTimes?.length && transactionTimes[0]) { | ||||||
|           this.transactionTime = transactionTimes[0]; |           this.transactionTime = transactionTimes[0]; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user