Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
toninorair committed Jul 3, 2024
1 parent 1d4b119 commit a5a9c68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/WrappedMToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ contract WrappedMToken is IWrappedMToken, Migratable, ERC20Extended {
mapping(address account => BalanceInfo balance) internal _balances;

modifier onlyWhenEarning() {
if (IMTokenLike(mToken).isEarning(address(this))) revert NotInEarningState();
if (!IMTokenLike(mToken).isEarning(address(this))) revert NotInEarningState();

_;
}
Expand Down
2 changes: 2 additions & 0 deletions test/WrappedMToken.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ contract WrappedMTokenTests is Test {
_wrappedMToken = WrappedMTokenHarness(address(new Proxy(address(_implementation))));

_mToken.setCurrentIndex(_currentIndex = 1_100000068703);

_wrappedMToken.startEarningM();
}

/* ============ constructor ============ */
Expand Down

0 comments on commit a5a9c68

Please sign in to comment.