From 84ef4247520600de547c5b1b01eac8dfa15f10ee Mon Sep 17 00:00:00 2001 From: nymkappa Date: Sat, 5 Mar 2022 19:05:19 +0100 Subject: [PATCH] Fix halving calculation --- frontend/src/app/components/difficulty/difficulty.component.ts | 2 +- .../components/mining-dashboard/mining-dashboard.component.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/components/difficulty/difficulty.component.ts b/frontend/src/app/components/difficulty/difficulty.component.ts index 8714ff9f1..b22001ef1 100644 --- a/frontend/src/app/components/difficulty/difficulty.component.ts +++ b/frontend/src/app/components/difficulty/difficulty.component.ts @@ -98,7 +98,7 @@ export class DifficultyComponent implements OnInit { colorPreviousAdjustments = '#ffffff66'; } - const blocksUntilHalving = block.height % 210000; + const blocksUntilHalving = 210000 - (block.height % 210000); const timeUntilHalving = (blocksUntilHalving * timeAvgMins * 60 * 1000) + (now * 1000); return { diff --git a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html index 88406fbf6..cd8330321 100644 --- a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html +++ b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html @@ -12,7 +12,7 @@
Difficulty Adjustment
- +