mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
Reverted change in old connector
This commit is contained in:
parent
1a9ab0ac70
commit
217b3d402c
|
@ -155,7 +155,7 @@ abstract contract OneProtoResolver is OneHelpers {
|
||||||
if (address(_sellAddr) == ethAddr) {
|
if (address(_sellAddr) == ethAddr) {
|
||||||
ethAmt = _sellAmt;
|
ethAmt = _sellAmt;
|
||||||
} else {
|
} else {
|
||||||
approve(_sellAddr, address(oneProtoContract), _sellAmt);
|
_sellAddr.approve(address(oneProtoContract), _sellAmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ abstract contract OneProtoResolver is OneHelpers {
|
||||||
if (address(_sellAddr) == ethAddr) {
|
if (address(_sellAddr) == ethAddr) {
|
||||||
ethAmt = _sellAmt;
|
ethAmt = _sellAmt;
|
||||||
} else {
|
} else {
|
||||||
approve(_sellAddr, address(oneSplitContract), _sellAmt);
|
_sellAddr.approve(address(oneSplitContract), _sellAmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint initalBal = getTokenBal(_buyAddr);
|
uint initalBal = getTokenBal(_buyAddr);
|
||||||
|
@ -442,7 +442,7 @@ abstract contract OneInchResolverHelpers is OneProtoResolverHelpers {
|
||||||
if (address(_sellAddr) == ethAddr) {
|
if (address(_sellAddr) == ethAddr) {
|
||||||
ethAmt = oneInchData._sellAmt;
|
ethAmt = oneInchData._sellAmt;
|
||||||
} else {
|
} else {
|
||||||
approve(TokenInterface(_sellAddr), getOneInchAddress(), oneInchData._sellAmt);
|
TokenInterface(_sellAddr).approve(getOneInchAddress(), oneInchData._sellAmt);
|
||||||
}
|
}
|
||||||
|
|
||||||
require(checkOneInchSig(oneInchData.callData), "Not-swap-function");
|
require(checkOneInchSig(oneInchData.callData), "Not-swap-function");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user