From e0e97f0d5e75fc04d007a4ef79b9465b91e3f3f3 Mon Sep 17 00:00:00 2001 From: Mononaut Date: Sat, 11 Mar 2023 19:32:59 +0900 Subject: [PATCH] Fix epoch length in difficulty widget --- .../src/app/components/difficulty/difficulty.component.html | 2 +- .../src/app/components/difficulty/difficulty.component.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/components/difficulty/difficulty.component.html b/frontend/src/app/components/difficulty/difficulty.component.html index 5b2f23cf3..e4a0993a8 100644 --- a/frontend/src/app/components/difficulty/difficulty.component.html +++ b/frontend/src/app/components/difficulty/difficulty.component.html @@ -4,7 +4,7 @@
- + diff --git a/frontend/src/app/components/difficulty/difficulty.component.ts b/frontend/src/app/components/difficulty/difficulty.component.ts index 910ea1384..b246a14fe 100644 --- a/frontend/src/app/components/difficulty/difficulty.component.ts +++ b/frontend/src/app/components/difficulty/difficulty.component.ts @@ -102,7 +102,7 @@ export class DifficultyComponent implements OnInit { this.expectedHeight = newExpectedHeight; this.currentHeight = this.stateService.latestBlockHeight; this.currentIndex = this.currentHeight - this.epochStart; - this.expectedIndex = Math.min(this.expectedHeight - this.epochStart, 2106) - 1; + this.expectedIndex = Math.min(this.expectedHeight - this.epochStart, 2016) - 1; this.difference = this.currentIndex - this.expectedIndex; this.shapes = []; @@ -115,7 +115,7 @@ export class DifficultyComponent implements OnInit { this.shapes = this.shapes.concat(this.blocksToShapes( this.expectedIndex + 1, this.currentIndex, 'ahead', false )); - if (this.currentIndex < 2105) { + if (this.currentIndex < 2015) { this.shapes = this.shapes.concat(this.blocksToShapes( this.currentIndex + 1, this.currentIndex + 1, 'next', (this.expectedIndex > this.currentIndex) ));