fix(contracts): OZ-L06 Possible Misleading revert Message When Swapping Non-ERC20Permit Tokens (#847)

Co-authored-by: zimpha <zimpha@users.noreply.github.com>
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com>
This commit is contained in:
Xi Lin
2023-08-25 10:23:02 +08:00
committed by GitHub
parent 6139ca0df0
commit e08b800d1d
2 changed files with 3 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ import (
"strings"
)
var tag = "v4.1.107"
var tag = "v4.1.108"
var commit = func() string {
if info, ok := debug.ReadBuildInfo(); ok {

View File

@@ -15,6 +15,7 @@ import {OwnableBase} from "../libraries/common/OwnableBase.sol";
contract GasSwap is ERC2771Context, ReentrancyGuard, OwnableBase {
using SafeERC20 for IERC20;
using SafeERC20 for IERC20Permit;
/**********
* Events *
@@ -94,7 +95,7 @@ contract GasSwap is ERC2771Context, ReentrancyGuard, OwnableBase {
address _sender = _msgSender();
// do permit
IERC20Permit(_permit.token).permit(
IERC20Permit(_permit.token).safePermit(
_sender,
address(this),
_permit.value,