Skip to content

Commit

Permalink
fixed logging issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ControlCplusControlV committed Oct 1, 2023
1 parent 5d0e428 commit 23d5109
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/MevEth.sol
Original file line number Diff line number Diff line change
Expand Up @@ -635,14 +635,15 @@ contract MevEth is Auth, ERC20, IERC4626, ITinyMevEth {
accumulatedAmount: withdrawalQueue[queueLength - 1].accumulatedAmount + amountOwed
});
emit WithdrawalQueueOpened(receiver, queueLength, uint256(amountOwed));
assets = availableBalance;
shares = shares - convertToShares(amountOwed);
uint256 assetsOwed = availableBalance;
}
if (assets != 0) {
// As with ERC4626, we log assets and shares as if there is no queue, and everything has been withdrawn
// as this most closely resembles what is happened
emit Withdraw(msg.sender, owner, receiver, assets, shares);

WETH9.deposit{ value: assets }();
WETH9.safeTransfer(receiver, assets);
WETH9.deposit{ value: availableBalance }();
WETH9.safeTransfer(receiver, availableBalance);
}
}

Expand Down

0 comments on commit 23d5109

Please sign in to comment.