From f593e45e2fb2c336b0643a3c15f553000675f327 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Mon, 18 Nov 2024 16:24:05 +0300 Subject: [PATCH] approve router, not wzeta --- contracts/SwapHelperLib.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/SwapHelperLib.sol b/contracts/SwapHelperLib.sol index 4f93b0a6..65daf550 100644 --- a/contracts/SwapHelperLib.sol +++ b/contracts/SwapHelperLib.sol @@ -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, @@ -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,