From 495a4aca9bcebc283340160b88df1b8e1a3c7fbf Mon Sep 17 00:00:00 2001 From: Oren Sokolowsky Date: Wed, 20 May 2020 12:18:46 +0300 Subject: [PATCH] avatar : use _to.call.value instead of transfer --- contracts/controller/Avatar.sol | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contracts/controller/Avatar.sol b/contracts/controller/Avatar.sol index fb7e4fa3..ad8c2438 100644 --- a/contracts/controller/Avatar.sol +++ b/contracts/controller/Avatar.sol @@ -66,7 +66,9 @@ contract Avatar is Ownable { * @return bool which represents success */ function sendEther(uint256 _amountInWei, address payable _to) public onlyOwner returns(bool) { - _to.transfer(_amountInWei); + // solhint-disable-next-line avoid-call-value + (bool success, ) = _to.call.value(_amountInWei)(""); + require(success, "sendEther failed."); emit SendEther(_amountInWei, _to); return true; }