Skip to content

Commit

Permalink
fix: use .call instead of .transfer when withdrawingEther to remove g…
Browse files Browse the repository at this point in the history
…as limitation
  • Loading branch information
ckoopmann committed Nov 11, 2024
1 parent e89098c commit 5395b65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/adapters/MorphoLeverageStrategyExtension.sol
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,8 @@ contract MorphoLeverageStrategyExtension is BaseExtension {
* OPERATOR ONLY: Withdraw entire balance of ETH in this contract to operator. Rebalance must not be in progress
*/
function withdrawEtherBalance() external onlyOperator noRebalanceInProgress {
msg.sender.transfer(address(this).balance);
(bool success, ) = msg.sender.call{value: address(this).balance}("");
require(success, "Ether transfer failed");
}

receive() external payable {}
Expand Down

0 comments on commit 5395b65

Please sign in to comment.