Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions contracts/modules/staking/StakingPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,10 @@ contract StakingPool is IStakingPool, ERC721 {
uint currentBucketId = block.timestamp / BUCKET_DURATION;
uint currentTrancheId = block.timestamp / TRANCHE_DURATION;

// skip if the pool is new
// if the pool is new
if (_firstActiveBucketId == 0) {
return;
_firstActiveBucketId = currentBucketId;
_firstActiveTrancheId = currentTrancheId;
}

// if a force update was not requested
Expand Down Expand Up @@ -246,9 +247,7 @@ contract StakingPool is IStakingPool, ERC721 {
}

if (_rewardsSharesSupply == 0) {
// nothing to do
firstActiveBucketId = currentBucketId;
firstActiveTrancheId = currentTrancheId;
// nothing to do, just update lastAccNxmUpdate
lastAccNxmUpdate = block.timestamp;
return;
}
Expand Down