Merge pull request #5566 from mempool/natsoni/fix-block-health-display

Avoid briefly showing incorrect health value
This commit is contained in:
softsimon authored and GitHub committed 2024-10-05 02:38:11 -06:00
commit ba167c9cc2
2 files changed
+2 -3

No files matched your search

@@ -66,10 +66,10 @@
[class.badge-success]="blockAudit?.matchRate >= 99"
[class.badge-warning]="blockAudit?.matchRate >= 75 && blockAudit?.matchRate < 99"
[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>
<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>
</ng-container>
</ng-template>
@@ -163,7 +163,6 @@ export class BlockComponent implements OnInit, OnDestroy {
this.block = undefined;
this.error = undefined;
this.fees = undefined;
this.blockAudit = undefined;
this.oobFees = 0;
if (history.state.data && history.state.data.blockHeight) {