From 3d27b7e7b49a7bad5cd814a0a143e936cee81d8e Mon Sep 17 00:00:00 2001 From: natsoni Date: Sat, 5 Oct 2024 17:16:00 +0900 Subject: [PATCH] Avoid briefly showing incorrect health value --- frontend/src/app/components/block/block.component.html | 4 ++-- frontend/src/app/components/block/block.component.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/components/block/block.component.html b/frontend/src/app/components/block/block.component.html index 09c3a5d23..105cdf31a 100644 --- a/frontend/src/app/components/block/block.component.html +++ b/frontend/src/app/components/block/block.component.html @@ -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 }}% - + Unknown diff --git a/frontend/src/app/components/block/block.component.ts b/frontend/src/app/components/block/block.component.ts index 8dd03ee0f..baf583744 100644 --- a/frontend/src/app/components/block/block.component.ts +++ b/frontend/src/app/components/block/block.component.ts @@ -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) {