Skip to content

Commit

Permalink
👷 fix updateReward modifier for compoundOnBehalf
Browse files Browse the repository at this point in the history
  • Loading branch information
Flocqst committed Jul 22, 2024
1 parent 9dee0eb commit 15eea33
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions contracts/StakingRewardsV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ contract StakingRewardsV2 is
///////////////////////////////////////////////////////////////*/

/// @inheritdoc IStakingRewardsV2
function stake(uint256 _amount) external whenNotPaused {
function stake(uint256 _amount) external {
_stake(msg.sender, _amount);

// transfer token to this contract from the caller
Expand All @@ -224,7 +224,7 @@ contract StakingRewardsV2 is
function _stake(address _account, uint256 _amount)
internal
whenNotPaused
updateReward(msg.sender)
updateReward(_account)
{
if (_amount == 0) revert AmountZero();

Expand Down Expand Up @@ -358,6 +358,8 @@ contract StakingRewardsV2 is
}
}

/// @notice Get the reward of the given account for compounding.
/// @dev Retrieves the reward without transferring it, as it will be staked immediately after.
function _getRewardCompounding(address _account)
internal
whenNotPaused
Expand Down

0 comments on commit 15eea33

Please sign in to comment.