Use block count instead of oldest block for timespan selection

This commit is contained in:
nymkappa
2022-04-15 20:43:10 +09:00
parent 056b1db8b3
commit a59bed8cd8
14 changed files with 96 additions and 118 deletions

View File

@@ -32,7 +32,8 @@ export class DifficultyAdjustmentsTable implements OnInit {
ngOnInit(): void {
this.hashrateObservable$ = this.apiService.getHistoricalHashrate$('1y')
.pipe(
map((data: any) => {
map((response) => {
const data = response.body;
const availableTimespanDay = (
(new Date().getTime() / 1000) - (data.oldestIndexedBlockTimestamp)
) / 3600 / 24;