Skip to content

Commit

Permalink
approve router, not wzeta
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev committed Nov 18, 2024
1 parent defaa9e commit f593e45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/SwapHelperLib.sol
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ library SwapHelperLib {
path[2] = targetZRC20;
}

IZRC20(zrc20).approve(address(router), amount);
IZRC20(zrc20).approve(router, amount);
uint256[] memory amounts = IUniswapV2Router01(router)
.swapExactTokensForTokens(
amount,
Expand Down Expand Up @@ -177,7 +177,7 @@ library SwapHelperLib {
path[2] = targetZRC20;
}

IZRC20(zrc20).approve(wzeta, amount);
IZRC20(zrc20).approve(router, amount);
uint256[] memory amounts = IUniswapV2Router01(router)
.swapExactTokensForTokens(
amount,
Expand Down

0 comments on commit f593e45

Please sign in to comment.