From a54f6398e5463081909e1d24248942c953b272a3 Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Sat, 1 Jul 2023 07:36:10 +0300 Subject: [PATCH] Update docs for `SafeERC20.forceApprove` (#4231) (cherry picked from commit 06861dce54a0145ede32dcd11e2a6181c250eb0d) --- contracts/token/ERC20/utils/SafeERC20.sol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/token/ERC20/utils/SafeERC20.sol b/contracts/token/ERC20/utils/SafeERC20.sol index 47d1684f174..e99cea0590f 100644 --- a/contracts/token/ERC20/utils/SafeERC20.sol +++ b/contracts/token/ERC20/utils/SafeERC20.sol @@ -76,8 +76,8 @@ library SafeERC20 { /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, - * non-reverting calls are assumed to be successful. Compatible with tokens that require the approval to be set to - * 0 before setting it to a non-zero value. + * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval + * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);