wise-token-contracts
wise-token-contracts copied to clipboard
_isMature returns wrong value for closed stakes overtime
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