mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
fixed bug on sell
This commit is contained in:
parent
7c9faf98df
commit
51403c4775
|
@ -164,7 +164,6 @@ contract LiquidityHelpers is UniswapHelpers {
|
|||
_tokens = new TokenInterface[](2);
|
||||
_tokens[0] = tokens[0] == getEthAddr() ? TokenInterface(getAddressWETH()) : TokenInterface(tokens[0]);
|
||||
_tokens[1] = tokens[1] == getEthAddr() ? TokenInterface(getAddressWETH()) : TokenInterface(tokens[1]);
|
||||
|
||||
}
|
||||
|
||||
function _addLiquidity(
|
||||
|
@ -474,7 +473,7 @@ contract UniswapResolver is UniswapLiquidity {
|
|||
|
||||
checkPair(router, paths);
|
||||
uint _expectedAmt = getExpectedBuyAmt(router, paths, _sellAmt);
|
||||
require(_slippageAmt >= _expectedAmt, "Too much slippage");
|
||||
require(_slippageAmt <= _expectedAmt, "Too much slippage");
|
||||
|
||||
convertEthToWeth(_sellAddr, _sellAmt);
|
||||
_sellAddr.approve(address(router), _sellAmt);
|
||||
|
|
Loading…
Reference in New Issue
Block a user