Skip to content

Commit

Permalink
Switch from .transfer to solmate's safeTransferETH (#210)
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenshively committed Dec 9, 2023
1 parent 8a0f1b9 commit ac30aa5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/src/Borrower.sol
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,9 @@ contract Borrower is IUniswapV3MintCallback {
_repay(repayable0, repayable1);
slot0 = (slot0_ & SLOT0_MASK_POSITIONS) | SLOT0_DIRT;

payable(callee).transfer(address(this).balance / strain);
emit Liquidate(repayable0, repayable1, incentive1, priceX128);

SafeTransferLib.safeTransferETH(payable(callee), address(this).balance / strain);
}
}

Expand Down Expand Up @@ -433,7 +434,7 @@ contract Borrower is IUniswapV3MintCallback {
*/
function withdrawAnte(address payable recipient) external onlyInModifyCallback {
// WARNING: External call to user-specified address
recipient.transfer(address(this).balance);
SafeTransferLib.safeTransferETH(recipient, address(this).balance);
}

/**
Expand Down

0 comments on commit ac30aa5

Please sign in to comment.