Skip to content

Commit

Permalink
fix(MorphoLeverageStrategyExtension): use .call instead of .transfer …
Browse files Browse the repository at this point in the history
…when withdrawingEther to remove gas limitation (#193)
  • Loading branch information
ckoopmann authored Nov 11, 2024
1 parent 1642d5f commit 67b7445
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 @@ -615,7 +615,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 67b7445

Please sign in to comment.