From 3e8a34f3fdc93e587c9fee4b82ad1d283cb7a11f Mon Sep 17 00:00:00 2001 From: nymkappa Date: Mon, 21 Mar 2022 12:16:41 +0900 Subject: [PATCH] Use 10 minutes avg block time for halving calculation --- .../src/app/components/difficulty/difficulty.component.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/frontend/src/app/components/difficulty/difficulty.component.ts b/frontend/src/app/components/difficulty/difficulty.component.ts index 3e949cc5c..5d969bf1e 100644 --- a/frontend/src/app/components/difficulty/difficulty.component.ts +++ b/frontend/src/app/components/difficulty/difficulty.component.ts @@ -63,10 +63,8 @@ export class DifficultyComponent implements OnInit { colorPreviousAdjustments = '#ffffff66'; } - const timeAvgMins = da.timeAvg; - const now = new Date().getTime() / 1000; const blocksUntilHalving = 210000 - (block.height % 210000); - const timeUntilHalving = (blocksUntilHalving * timeAvgMins * 60 * 1000) + (now * 1000); + const timeUntilHalving = new Date().getTime() + (blocksUntilHalving * 600000); const data = { base: `${da.progressPercent.toFixed(2)}%`,