mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
Fixed allowance issue in curve connector
This commit is contained in:
parent
ea2b3edd3d
commit
96c7da1659
|
@ -166,7 +166,7 @@ contract CurveProtocol is CurveHelpers {
|
||||||
|
|
||||||
emit LogDeposit(token, _amt, mintAmt, getId, setId);
|
emit LogDeposit(token, _amt, mintAmt, getId, setId);
|
||||||
bytes32 _eventCode = keccak256("LogDeposit(address,uint256,uint256,uint256,uint256)");
|
bytes32 _eventCode = keccak256("LogDeposit(address,uint256,uint256,uint256,uint256)");
|
||||||
bytes memory _eventParam = abi.encode(_amt, mintAmt, getId, setId);
|
bytes memory _eventParam = abi.encode(token, _amt, mintAmt, getId, setId);
|
||||||
emitEvent(_eventCode, _eventParam);
|
emitEvent(_eventCode, _eventParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,7 +207,9 @@ contract CurveProtocol is CurveHelpers {
|
||||||
uint _amt18 = convertTo18(TokenInterface(token).decimals(), _amt);
|
uint _amt18 = convertTo18(TokenInterface(token).decimals(), _amt);
|
||||||
uint _slippageAmt = wmul(unitAmt, _amt18);
|
uint _slippageAmt = wmul(unitAmt, _amt18);
|
||||||
|
|
||||||
|
curveTokenContract.approve(address(curveSwap), 0);
|
||||||
curveTokenContract.approve(address(curveSwap), _slippageAmt);
|
curveTokenContract.approve(address(curveSwap), _slippageAmt);
|
||||||
|
|
||||||
curveSwap.remove_liquidity_imbalance(_amts, _slippageAmt);
|
curveSwap.remove_liquidity_imbalance(_amts, _slippageAmt);
|
||||||
|
|
||||||
setUint(setId, _amt);
|
setUint(setId, _amt);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user