From c762fd2eb2a7cdf5db573d8a87ba89c82e57d451 Mon Sep 17 00:00:00 2001 From: Daniel Graczer Date: Wed, 21 Sep 2022 17:42:46 +0700 Subject: [PATCH] Partially emoved buggy safeApprove --- Readme.md | 1 + contracts/common/bases/StrategyBaseUpgradeable.sol | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index 47cfaa2d..c0bc46b8 100644 --- a/Readme.md +++ b/Readme.md @@ -36,6 +36,7 @@ 1. refactoring: scripts/helper.ts 1. add comments to unified test scripts 1. improve unified test performance +1. write our own version of safeApprove: https://github.com/OpenZeppelin/openzeppelin-contracts/issues/2219 ## Versioning of strategies diff --git a/contracts/common/bases/StrategyBaseUpgradeable.sol b/contracts/common/bases/StrategyBaseUpgradeable.sol index 413d7c5f..d30f24b0 100644 --- a/contracts/common/bases/StrategyBaseUpgradeable.sol +++ b/contracts/common/bases/StrategyBaseUpgradeable.sol @@ -382,7 +382,7 @@ abstract contract StrategyBaseUpgradeable is swapService_.router ); - IERC20Upgradeable(path[0]).safeApprove( + IERC20Upgradeable(path[0]).approve( address(traderjoeRouter), amountIn );