mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-22 07:08:49 +00:00
Fixes
This commit is contained in:
parent
d682f6504b
commit
29247967e7
1 changed files with 4 additions and 4 deletions
|
@ -82,7 +82,7 @@ final dates = {
|
||||||
"2020-8": 2153983,
|
"2020-8": 2153983,
|
||||||
"2020-9": 2176466,
|
"2020-9": 2176466,
|
||||||
"2020-10": 2198453,
|
"2020-10": 2198453,
|
||||||
"2020-11": 2221803
|
"2020-11": 2220000
|
||||||
};
|
};
|
||||||
|
|
||||||
final heightCoefficient = 0.7;
|
final heightCoefficient = 0.7;
|
||||||
|
@ -104,9 +104,9 @@ int getHeigthByDate({DateTime date}) {
|
||||||
startHeight = dates[raw];
|
startHeight = dates[raw];
|
||||||
final index = dates.values.toList().indexOf(startHeight);
|
final index = dates.values.toList().indexOf(startHeight);
|
||||||
endHeight = dates.values.toList()[index + 1];
|
endHeight = dates.values.toList()[index + 1];
|
||||||
final heightPerDay = (endHeight - startHeight) / 31;
|
final heightPerDay = ((endHeight - startHeight) / 31).round();
|
||||||
final daysHeight = (date.day - 1) * heightPerDay.round();
|
final daysHeight = (date.day - 1) * heightPerDay;
|
||||||
height = startHeight + daysHeight;
|
height = startHeight + daysHeight - heightPerDay;
|
||||||
}
|
}
|
||||||
|
|
||||||
return height;
|
return height;
|
||||||
|
|
Loading…
Reference in a new issue