Skip to content

Commit b7c586f

Browse files
committed
fix: Remove unnecessary approval
1 parent 0e4d27b commit b7c586f

File tree

2 files changed

+0
-4
lines changed

2 files changed

+0
-4
lines changed

contracts/adapters/paraswap/BaseParaSwapBuyAdapter.sol

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ abstract contract BaseParaSwapBuyAdapter is BaseParaSwapAdapter {
7676
uint256 balanceBeforeAssetTo = assetToSwapTo.balanceOf(address(this));
7777

7878
address tokenTransferProxy = augustus.getTokenTransferProxy();
79-
assetToSwapFrom.safeApprove(tokenTransferProxy, 0);
8079
assetToSwapFrom.safeApprove(tokenTransferProxy, maxAmountToSwap);
8180

8281
if (toAmountOffset != 0) {

contracts/adapters/paraswap/BaseParaSwapSellAdapter.sol

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,6 @@ abstract contract BaseParaSwapSellAdapter is BaseParaSwapAdapter {
9898
revert(0, returndatasize())
9999
}
100100
}
101-
102-
// Reset allowance
103-
assetToSwapFrom.safeApprove(tokenTransferProxy, 0);
104101

105102
require(
106103
assetToSwapFrom.balanceOf(address(this)) == balanceBeforeAssetFrom - amountToSwap,

0 commit comments

Comments
 (0)