Merge pull request #5566 from mempool/natsoni/fix-block-health-display
Avoid briefly showing incorrect health value
This commit is contained in:
		
						commit
						ba167c9cc2
					
				| @ -66,10 +66,10 @@ | |||||||
|                     [class.badge-success]="blockAudit?.matchRate >= 99" |                     [class.badge-success]="blockAudit?.matchRate >= 99" | ||||||
|                     [class.badge-warning]="blockAudit?.matchRate >= 75 && blockAudit?.matchRate < 99" |                     [class.badge-warning]="blockAudit?.matchRate >= 75 && blockAudit?.matchRate < 99" | ||||||
|                     [class.badge-danger]="blockAudit?.matchRate < 75" |                     [class.badge-danger]="blockAudit?.matchRate < 75" | ||||||
|                     *ngIf="blockAudit?.matchRate != null; else nullHealth" |                     *ngIf="blockAudit?.matchRate != null && blockAudit?.id === block.id; else nullHealth" | ||||||
|                   >{{ blockAudit?.matchRate }}%</span> |                   >{{ blockAudit?.matchRate }}%</span> | ||||||
|                   <ng-template #nullHealth> |                   <ng-template #nullHealth> | ||||||
|                     <ng-container *ngIf="!isLoadingOverview; else loadingHealth"> |                     <ng-container *ngIf="!isLoadingOverview && blockAudit?.id === block.id; else loadingHealth"> | ||||||
|                       <span class="health-badge badge badge-secondary" i18n="unknown">Unknown</span> |                       <span class="health-badge badge badge-secondary" i18n="unknown">Unknown</span> | ||||||
|                     </ng-container> |                     </ng-container> | ||||||
|                   </ng-template> |                   </ng-template> | ||||||
|  | |||||||
| @ -163,7 +163,6 @@ export class BlockComponent implements OnInit, OnDestroy { | |||||||
|         this.block = undefined; |         this.block = undefined; | ||||||
|         this.error = undefined; |         this.error = undefined; | ||||||
|         this.fees = undefined; |         this.fees = undefined; | ||||||
|         this.blockAudit = undefined; |  | ||||||
|         this.oobFees = 0; |         this.oobFees = 0; | ||||||
| 
 | 
 | ||||||
|         if (history.state.data && history.state.data.blockHeight) { |         if (history.state.data && history.state.data.blockHeight) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user