Skip to content

Commit

Permalink
changed out the transfer for "safer" call
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchimedesCrypto committed Aug 11, 2022
1 parent 9b8309d commit 99c12e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contracts/sushixklima/SushiswapGreenWrapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ contract SushiswapGreenSwapWrapper is
uint deadline) public {

IUniswapV2Router02(sushiRouterMain).swapTokensForExactTokens(amountIn,amountOutMin, path, to, deadline);
retirementHoldingAddress.transfer(sushiAmountOffset);
(bool sent, bytes memory data) = retirementHoldingAddress.call{value: sushiAmountOffset}("");
require(sent, "Failed to send Ether");
}

function setRetirementHoldingAddress(address _newHoldingAddress) public onlyOwner {
Expand Down

0 comments on commit 99c12e0

Please sign in to comment.