Done with uniswap v2 swapping functions

This commit is contained in:
Thrilok Kumar 2020-05-23 04:20:05 +05:30
parent 8ed8852a28
commit 2786b1630e

View File

@ -230,7 +230,6 @@ contract UniswapResolver is UniswapHelpers {
uint getId,
uint setId
) external payable {
// swapTokensForExactTokens
uint _buyAmt = getUint(getId, buyAmt);
(TokenInterface _buyAddr, TokenInterface _sellAddr) = changeEthAddress(buyAddr, sellAddr);
address[] memory paths = getPaths(address(_buyAddr), address(_sellAddr));
@ -247,8 +246,6 @@ contract UniswapResolver is UniswapHelpers {
convertEthToWeth(_sellAddr, _expectedAmt);
_sellAddr.approve(address(router), _expectedAmt);
uint[] memory _amts = router.swapTokensForExactTokens(
_buyAmt,
_expectedAmt,
@ -287,7 +284,6 @@ contract UniswapResolver is UniswapHelpers {
uint getId,
uint setId
) external payable {
// /swapExactTokensForTokens/
uint _sellAmt = getUint(getId, sellAmt);
(TokenInterface _buyAddr, TokenInterface _sellAddr) = changeEthAddress(buyAddr, sellAddr);
address[] memory paths = getPaths(address(_buyAddr), address(_sellAddr));