Skip to content

Commit

Permalink
chore: update Lido.rescueFunds natspec; change transfer to safetransfer
Browse files Browse the repository at this point in the history
  • Loading branch information
samparsky committed Sep 28, 2023
1 parent fa5ad33 commit 012a543
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lido/LidoSplit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ contract LidoSplit is Clone {
ERC20(wstETH).safeTransfer(splitWallet(), amount);
}

/// @notice Rescue stuck ETH
/// @notice Rescue stuck ETH and tokens
/// Uses token == address(0) to represent ETH
/// @return balance Amount of ETH rescued
/// @return balance Amount of ETH or tokens rescued
function rescueFunds(address token) external returns (uint256 balance) {
if (token == address(stETH)) revert Invalid_Address();

Expand All @@ -81,7 +81,7 @@ contract LidoSplit is Clone {
if (balance > 0) splitWallet().safeTransferETH(balance);
} else {
balance = ERC20(token).balanceOf(address(this));
if (balance > 0) ERC20(token).transfer(splitWallet(), balance);
if (balance > 0) ERC20(token).safeTransfer(splitWallet(), balance);
}
}
}

0 comments on commit 012a543

Please sign in to comment.