diff --git a/contracts/vesting/src/vesting/account/mod.rs b/contracts/vesting/src/vesting/account/mod.rs index 5418619cfe..b5369aa410 100644 --- a/contracts/vesting/src/vesting/account/mod.rs +++ b/contracts/vesting/src/vesting/account/mod.rs @@ -101,10 +101,9 @@ impl Account { } } + /// Returns the index of the next vesting period. Unless the current time is somehow in the past or vesting has not started yet. + /// In case vesting is over it will always return NUM_VESTING_PERIODS. pub fn get_current_vesting_period(&self, block_time: Timestamp) -> Period { - // Returns the index of the next vesting period. Unless the current time is somehow in the past or vesting has not started yet. - // In case vesting is over it will always return NUM_VESTING_PERIODS. - if block_time.seconds() < self.periods.first().unwrap().start_time { Period::Before } else if self.periods.last().unwrap().end_time() < block_time {