From 4ccba31d237f8e2f1da09009ec90b3fca0161bdb Mon Sep 17 00:00:00 2001 From: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 1 Jul 2023 04:37:32 +0000 Subject: [PATCH] Update docs --- contracts/token/ERC20/utils/SafeERC20.sol | 4 ++-- docs/modules/api/pages/token/ERC20.adoc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/contracts/token/ERC20/utils/SafeERC20.sol b/contracts/token/ERC20/utils/SafeERC20.sol index 47d1684f1..e99cea059 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); diff --git a/docs/modules/api/pages/token/ERC20.adoc b/docs/modules/api/pages/token/ERC20.adoc index 8c2f2d06b..512388056 100644 --- a/docs/modules/api/pages/token/ERC20.adoc +++ b/docs/modules/api/pages/token/ERC20.adoc @@ -2997,8 +2997,8 @@ non-reverting calls are assumed to be successful. ==== `[.contract-item-name]#++forceApprove++#++(contract IERC20 token, address spender, uint256 value)++` [.item-kind]#internal# 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. [.contract-item] [[SafeERC20-safePermit-contract-IERC20Permit-address-address-uint256-uint256-uint8-bytes32-bytes32-]]