From e664e91a41f9216349ca53856a29041955f3a709 Mon Sep 17 00:00:00 2001 From: Thrilok Kumar Date: Fri, 29 May 2020 02:22:37 +0530 Subject: [PATCH] Minor fix --- contracts/connectors/uniswapV2.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/connectors/uniswapV2.sol b/contracts/connectors/uniswapV2.sol index 4d28d42..4383cf9 100644 --- a/contracts/connectors/uniswapV2.sol +++ b/contracts/connectors/uniswapV2.sol @@ -192,7 +192,7 @@ contract LiquidityHelpers is UniswapHelpers { address(_tokenB), _amtA, _amtB, - getMinAmount(_tokenA, _amtB, slippage), + getMinAmount(_tokenA, _amtA, slippage), getMinAmount(_tokenB, _amtB, slippage), address(this), now + deadline // TODO - deadline? @@ -216,8 +216,8 @@ contract LiquidityHelpers is UniswapHelpers { _uniAmt = _amt == uint(-1) ? uniToken.balanceOf(address(this)) : _amt; uniToken.approve(address(router), _uniAmt); - uint minAmtA = convert18ToDec(_tokenA.decimals(), wmul(unitAmtA, _amt)); - uint minAmtB = convert18ToDec(_tokenB.decimals(), wmul(unitAmtB, _amt)); + uint minAmtA = convert18ToDec(_tokenA.decimals(), wmul(unitAmtA, _uniAmt)); + uint minAmtB = convert18ToDec(_tokenB.decimals(), wmul(unitAmtB, _uniAmt)); (_amtA, _amtB) = router.removeLiquidity( address(_tokenA),