Bugfix: Change mempool block time precision. (#650)

* Fix time precision.

* Fix rounding numbers only for minutes range.
Fix reflected avg time to ETA transactions.

* Fix now variable update.
This commit is contained in:
Miguel Medeiros
2021-07-24 19:26:29 -03:00
committed by GitHub
parent 11f5e99187
commit f6a889298c
6 changed files with 43 additions and 9 deletions

View File

@@ -77,7 +77,6 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
this.mempoolBlocks = this.reduceMempoolBlocksToFitScreen(JSON.parse(stringifiedBlocks));
this.updateMempoolBlockStyles();
this.calculateTransactionPosition();
this.now = new Date().getTime();
return this.mempoolBlocks;
})
);
@@ -90,6 +89,7 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
this.stateService.lastDifficultyAdjustment$
])),
map(([block, DATime]) => {
this.now = new Date().getTime();
const now = new Date().getTime() / 1000;
const diff = now - DATime;
const blocksInEpoch = block.height % 2016;