From 7c6feb427932b8f3b0ab3a6fb01fc33a44634b2f Mon Sep 17 00:00:00 2001 From: toninorair Date: Tue, 2 Jul 2024 17:02:51 -0400 Subject: [PATCH] Change block-enter logic --- src/WrappedMToken.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WrappedMToken.sol b/src/WrappedMToken.sol index e76347b..915a9f6 100644 --- a/src/WrappedMToken.sol +++ b/src/WrappedMToken.sol @@ -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_); @@ -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_);