Skip to content

Commit

Permalink
Change block-enter logic
Browse files Browse the repository at this point in the history
  • Loading branch information
toninorair committed Jul 2, 2024
1 parent cf69acc commit 7c6feb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WrappedMToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ contract WrappedMToken is IWrappedMToken, Migratable, ERC20Extended {

/* ============ Interactive Functions ============ */

function wrap(address recipient_, uint256 amount_) external onlyWhenEarning {
function wrap(address recipient_, uint256 amount_) external {
_mint(recipient_, UIntMath.safe240(amount_));

IMTokenLike(mToken).transferFrom(msg.sender, address(this), amount_);
Expand All @@ -78,7 +78,7 @@ contract WrappedMToken is IWrappedMToken, Migratable, ERC20Extended {
IMTokenLike(mToken).transfer(vault, yield_);
}

function startEarningFor(address account_) external {
function startEarningFor(address account_) external onlyWhenEarning {
if (!_isApprovedEarner(account_)) revert NotApprovedEarner();

(bool isEarning_, , , uint240 balance_) = _getBalanceInfo(account_);
Expand Down

0 comments on commit 7c6feb4

Please sign in to comment.