mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
fixed .call bug
This commit is contained in:
parent
2c76a8ae27
commit
466ce9b1e4
|
@ -232,7 +232,9 @@ contract BasicResolver is Resolver {
|
||||||
|
|
||||||
uint initalBal = getTokenBal(_buyAddr);
|
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 finalBal = getTokenBal(_buyAddr);
|
||||||
uint buyAmt = sub(finalBal, initalBal);
|
uint buyAmt = sub(finalBal, initalBal);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user