Skip to content

Commit 67b7445

Browse files
authored
fix(MorphoLeverageStrategyExtension): use .call instead of .transfer when withdrawingEther to remove gas limitation (#193)
1 parent 1642d5f commit 67b7445

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contracts/adapters/MorphoLeverageStrategyExtension.sol

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,8 @@ contract MorphoLeverageStrategyExtension is BaseExtension {
615615
* OPERATOR ONLY: Withdraw entire balance of ETH in this contract to operator. Rebalance must not be in progress
616616
*/
617617
function withdrawEtherBalance() external onlyOperator noRebalanceInProgress {
618-
msg.sender.transfer(address(this).balance);
618+
(bool success, ) = msg.sender.call{value: address(this).balance}("");
619+
require(success, "Ether transfer failed");
619620
}
620621

621622
receive() external payable {}

0 commit comments

Comments
 (0)