Skip to content

Commit

Permalink
change ASSET_MANAGER to address(this) in claimRewards
Browse files Browse the repository at this point in the history
  • Loading branch information
defi-dev committed May 24, 2022
1 parent 2152298 commit 3f8b4c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/connectors/BProtocolPowerIndexConnector.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ contract BProtocolPowerIndexConnector is AbstractBalancerVaultConnector {
if (pending > 0) {
_claimImpl();
}
uint256 receivedReward = REWARDS_TOKEN.balanceOf(ASSET_MANAGER);
uint256 receivedReward = REWARDS_TOKEN.balanceOf(address(this));
if (receivedReward > 0) {
uint256 rewardsToReinvest;
(, rewardsToReinvest, ) = _distributePerformanceFee(
_distributeData.performanceFee,
_distributeData.performanceFeeReceiver,
0,
ASSET_MANAGER,
address(this),
REWARDS_TOKEN,
receivedReward
);

_swapRewardsToUnderlying(rewardsToReinvest);

_stakeImpl(IERC20(UNDERLYING).balanceOf(ASSET_MANAGER));
_stakeImpl(IERC20(UNDERLYING).balanceOf(address(this)));
return stakeData;
}
// Otherwise the rewards are distributed each time deposit/withdraw methods are called,
Expand Down

0 comments on commit 3f8b4c5

Please sign in to comment.