From 0464ad4bcf06a9fabac2bc7dbfd753c437f8ed1e Mon Sep 17 00:00:00 2001 From: softsimon Date: Tue, 22 Sep 2020 12:26:54 +0700 Subject: [PATCH] Hide Difficulty Epoch on Liquid. Updated difficulty change calc. --- frontend/src/app/dashboard/dashboard.component.html | 2 +- frontend/src/app/dashboard/dashboard.component.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/dashboard/dashboard.component.html b/frontend/src/app/dashboard/dashboard.component.html index fdea0c716..c11627005 100644 --- a/frontend/src/app/dashboard/dashboard.component.html +++ b/frontend/src/app/dashboard/dashboard.component.html @@ -34,7 +34,7 @@ -
+
Difficulty epoch
diff --git a/frontend/src/app/dashboard/dashboard.component.ts b/frontend/src/app/dashboard/dashboard.component.ts index d9d88bf4d..642cfbc45 100644 --- a/frontend/src/app/dashboard/dashboard.component.ts +++ b/frontend/src/app/dashboard/dashboard.component.ts @@ -78,7 +78,7 @@ export class DashboardComponent implements OnInit { const diff = now - DATime; const blocksInEpoch = block.height % 2016; const estimatedBlocks = Math.round(diff / 60 / 10); - const difficultyChange = blocksInEpoch / (diff / 60 / 10) - 1; + const difficultyChange = (blocksInEpoch - (diff / 60 / 10)) / blocksInEpoch * 100; let base = 0; let green = 0;