Skip to content

Commit

Permalink
Removed unnecessary arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
ggviana committed Oct 17, 2022
1 parent 17136cc commit f100925
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions contracts/mocks/PrincipalProtectedMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ contract PrincipalProtectedMock is BaseVault {
sharePriceDecimals = _asset.decimals();
}

function _afterRoundStart(uint256 assets) internal override {
function _afterRoundStart() internal override {
lastRoundAssets = totalAssets();
if (assets > 0) {
IERC20Metadata(asset()).approve(address(yieldSource), assets);
yieldSource.deposit(assets, address(this));
if (processedDeposits > 0) {
IERC20Metadata(asset()).approve(address(yieldSource), processedDeposits);
yieldSource.deposit(processedDeposits, address(this));
}
uint256 supply = totalSupply();

Expand Down
8 changes: 4 additions & 4 deletions contracts/mocks/YieldVaultMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ contract YieldVaultMock is BaseVault {
yieldSource.withdraw(assets, address(this), address(this));
}

function _afterRoundStart(uint256 assets) internal override {
if (yieldSource.previewDeposit(assets) > 0) {
IERC20Metadata(yieldSource.asset()).approve(address(yieldSource), assets);
yieldSource.deposit(assets, address(this));
function _afterRoundStart() internal override {
if (yieldSource.previewDeposit(processedDeposits) > 0) {
IERC20Metadata(yieldSource.asset()).approve(address(yieldSource), processedDeposits);
yieldSource.deposit(processedDeposits, address(this));
}
}
}
4 changes: 2 additions & 2 deletions contracts/vaults/BaseVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ abstract contract BaseVault is IVault, ERC20Permit, ERC4626, Capped {

isProcessingDeposits = false;

_afterRoundStart(processedDeposits);
_afterRoundStart();
emit RoundStarted(currentRoundId, processedDeposits);
processedDeposits = 0;

Expand Down Expand Up @@ -432,7 +432,7 @@ abstract contract BaseVault is IVault, ERC20Permit, ERC4626, Capped {
/* This hook should be implemented in the contract implementation.
It will trigger after setting isProcessingDeposits to false
*/
function _afterRoundStart(uint256 assets) internal virtual {}
function _afterRoundStart() internal virtual {}

// solhint-disable-next-line no-empty-blocks
/* This hook should be implemented in the contract implementation.
Expand Down
2 changes: 1 addition & 1 deletion contracts/vaults/STETHVault.sol
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ contract STETHVault is BaseVault {
sharePriceDecimals = _asset.decimals();
}

function _afterRoundStart(uint256) internal override {
function _afterRoundStart() internal override {
uint256 supply = totalSupply();

lastRoundAssets = totalAssets();
Expand Down

0 comments on commit f100925

Please sign in to comment.