Skip to content

Commit

Permalink
fix: Remove constructor of RewardsController
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelmtzinf committed Nov 17, 2022
1 parent bbe949e commit 4210a75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 0 additions & 2 deletions contracts/rewards/RewardsController.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ contract RewardsController is RewardsDistributor, VersionedInitializable, IRewar
_;
}

constructor(address emissionManager) RewardsDistributor(emissionManager) {}

/**
* @dev Initialize for RewardsController
* @param emissionManager address of the EmissionManager
Expand Down
9 changes: 4 additions & 5 deletions contracts/rewards/RewardsDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@ abstract contract RewardsDistributor is IRewardsDistributor {
_;
}

constructor(address emissionManager) {
_setEmissionManager(emissionManager);
}

/// @inheritdoc IRewardsDistributor
function getRewardsData(address asset, address reward)
public
Expand Down Expand Up @@ -405,7 +401,10 @@ abstract contract RewardsDistributor is IRewardsDistributor {
// Add unrealized rewards
for (uint256 i = 0; i < userAssetBalances.length; i++) {
if (userAssetBalances[i].userBalance == 0) {
unclaimedRewards += _assets[userAssetBalances[i].asset].rewards[reward].usersData[user].accrued;
unclaimedRewards += _assets[userAssetBalances[i].asset]
.rewards[reward]
.usersData[user]
.accrued;
} else {
unclaimedRewards +=
_getPendingRewards(user, reward, userAssetBalances[i]) +
Expand Down

0 comments on commit 4210a75

Please sign in to comment.