mirror of
https://github.com/Instadapp/dsa-connectors-old.git
synced 2024-07-29 22:47:46 +00:00
Fixed stack too deep error
This commit is contained in:
parent
489fc8b69a
commit
3d6d1e21e2
|
@ -420,15 +420,13 @@ contract UniswapResolver is UniswapLiquidity {
|
||||||
convertEthToWeth(_sellAddr, _expectedAmt);
|
convertEthToWeth(_sellAddr, _expectedAmt);
|
||||||
_sellAddr.approve(address(router), _expectedAmt);
|
_sellAddr.approve(address(router), _expectedAmt);
|
||||||
|
|
||||||
uint[] memory _amts = router.swapTokensForExactTokens(
|
uint _sellAmt = router.swapTokensForExactTokens(
|
||||||
_buyAmt,
|
_buyAmt,
|
||||||
_expectedAmt,
|
_expectedAmt,
|
||||||
paths,
|
paths,
|
||||||
address(this),
|
address(this),
|
||||||
now + 1
|
now + 1
|
||||||
);
|
)[0];
|
||||||
|
|
||||||
uint _sellAmt = _amts[0];
|
|
||||||
|
|
||||||
convertWethToEth(_buyAddr, _buyAmt);
|
convertWethToEth(_buyAddr, _buyAmt);
|
||||||
|
|
||||||
|
@ -478,15 +476,13 @@ contract UniswapResolver is UniswapLiquidity {
|
||||||
convertEthToWeth(_sellAddr, _sellAmt);
|
convertEthToWeth(_sellAddr, _sellAmt);
|
||||||
_sellAddr.approve(address(router), _sellAmt);
|
_sellAddr.approve(address(router), _sellAmt);
|
||||||
|
|
||||||
uint[] memory _amts = router.swapExactTokensForTokens(
|
uint _buyAmt = router.swapExactTokensForTokens(
|
||||||
_sellAmt,
|
_sellAmt,
|
||||||
_expectedAmt,
|
_expectedAmt,
|
||||||
paths,
|
paths,
|
||||||
address(this),
|
address(this),
|
||||||
now + 1
|
now + 1
|
||||||
);
|
)[1];
|
||||||
|
|
||||||
uint _buyAmt = _amts[1];
|
|
||||||
|
|
||||||
convertWethToEth(_buyAddr, _buyAmt);
|
convertWethToEth(_buyAddr, _buyAmt);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user