wise-token-contracts icon indicating copy to clipboard operation
wise-token-contracts copied to clipboard

_isMature returns wrong value for closed stakes overtime

Open vm06007 opened this issue 4 years ago • 0 comments

https://github.com/wise-foundation/wise-token-contracts/blob/fe975b5f065d020ab3af065679f5c7bb738e1d1a/contracts/Helper.sol#L162

if the stake gets closed pre-maturely eventually this expression will return true once the _currentWiseDay() has reached the finalDay which will affect checkMyStakeByID() return information for UI, not critical but needs adjustment to take in account stake.closeDay to determine maturity.

function _isMatureStake(Stake memory _stake) internal view returns (bool) { return _stake.closeDay > 0 ? _stake.finalDay <= _stake.closeDay : _stake.finalDay <= _currentWiseDay(); }

as an option

vm06007 avatar Dec 02 '20 11:12 vm06007