Skip to content

Commit

Permalink
add check valid recipient
Browse files Browse the repository at this point in the history
  • Loading branch information
Zohar97 committed Sep 21, 2023
1 parent 81a1222 commit e8e7429
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions contracts/KSRescue.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ abstract contract KSRescue is KyberSwapRole {
address private constant ETH_ADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);

function rescueFunds(IERC20 token, uint256 amount, address recipient) external onlyOwner {
require(recipient != address(0), 'KSRescue: invalid recipient');
if (amount == 0) amount = _getAvailableAmount(token);
if (amount > 0) {
if (_isETH(token)) {
Expand Down

0 comments on commit e8e7429

Please sign in to comment.