Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

fixed: new cacher avg block time calculation #2290

Merged
merged 10 commits into from
Jul 23, 2020
1 change: 1 addition & 0 deletions CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
### Scan

- (impv) [\#2299](https://github.com/bandprotocol/bandchain/pull/2299) Update the latest transactions table for mobile version.
- (bugs) [\#2290](https://github.com/bandprotocol/bandchain/pull/2290) Fix average block time calculation on `ValidatorHomePage` when using new cacher

### Bridges

Expand Down
2 changes: 1 addition & 1 deletion scan/src/pages/ValidatorHomePage.re
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ module ValidatorList = {

let getPrevDay = _ => {
MomentRe.momentNow()
|> MomentRe.Moment.defaultUtc
|> MomentRe.Moment.subtract(~duration=MomentRe.duration(1., `days))
|> MomentRe.Moment.format(Config.timestampUseFormat);
};
Expand All @@ -520,7 +521,6 @@ let make = () => {
let timeOutID = Js.Global.setInterval(() => {setPrevDayTime(getPrevDay)}, 60_000);
Some(() => {Js.Global.clearInterval(timeOutID)});
});

let (isActive, setIsActive) = React.useState(_ => true);

let validatorsSub = ValidatorSub.getList(~isActive, ());
Expand Down