fixed .call bug

This commit is contained in:
Thrilok Kumar 2020-05-09 02:41:56 +05:30
parent 2c76a8ae27
commit 466ce9b1e4

View File

@ -232,7 +232,9 @@ contract BasicResolver is Resolver {
uint initalBal = getTokenBal(_buyAddr);
address(getOneInchAddress()).call.value(ethAmt)(callData);
// solium-disable-next-line security/no-call-value
(bool success, ) = address(getOneInchAddress()).call.value(ethAmt)(callData);
if (!success) revert("1Inch-swap-failed");
uint finalBal = getTokenBal(_buyAddr);
uint buyAmt = sub(finalBal, initalBal);