Skip to content

Commit

Permalink
fix: remove token
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlagonia committed Mar 28, 2024
1 parent 2c5efd6 commit c80de92
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/swappers/TradeFactorySwapper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,12 @@ abstract contract TradeFactorySwapper {
_rewardTokensLocal.length - 1
];
}
ERC20(_tokenFrom).safeApprove(_tf, 0);
ITradeFactory(_tf).disable(_tokenFrom, _tokenTo);

if (_tf != address(0)) {
ERC20(_tokenFrom).safeApprove(_tf, 0);
ITradeFactory(_tf).disable(_tokenFrom, _tokenTo);
}

// Set to storage
_rewardTokens = _rewardTokensLocal;
_rewardTokens.pop();
Expand Down

0 comments on commit c80de92

Please sign in to comment.