From 6865e00738c0e8b50a824d4c0f7fa57388016565 Mon Sep 17 00:00:00 2001 From: softsimon Date: Mon, 2 Nov 2020 14:48:48 +0700 Subject: [PATCH] Fix: Reduce red difficulty adjustment progress when nearing end of cycle. --- frontend/src/app/dashboard/dashboard.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/dashboard/dashboard.component.ts b/frontend/src/app/dashboard/dashboard.component.ts index 96cdbf2b9..ae010be2e 100644 --- a/frontend/src/app/dashboard/dashboard.component.ts +++ b/frontend/src/app/dashboard/dashboard.component.ts @@ -116,7 +116,7 @@ export class DashboardComponent implements OnInit { green = (blocksInEpoch - estimatedBlocks) / 2016 * 100; } else { base = blocksInEpoch / 2016 * 100; - red = (estimatedBlocks - blocksInEpoch) / 2016 * 100; + red = Math.min((estimatedBlocks - blocksInEpoch) / 2016 * 100, 100 - base); } return {