Skip to content

Commit c34124e

Browse files
committed
👮 permit security upgraded
1 parent 8ae492f commit c34124e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

‎contracts/SwapsERC20.sol

+5-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ contract SwapsERC20 {
192192
{
193193
require(
194194
_deadline >= block.timestamp,
195-
"PERMIT_CALL_EXPIRED"
195+
"SwapsERC20: PERMIT_CALL_EXPIRED"
196196
);
197197

198198
bytes32 digest = keccak256(
@@ -212,6 +212,10 @@ contract SwapsERC20 {
212212
)
213213
);
214214

215+
if (uint256(_s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
216+
revert("SwapsERC20: INVALID_SIGNATURE");
217+
}
218+
215219
address recoveredAddress = ecrecover(
216220
digest,
217221
_v,

0 commit comments

Comments
 (0)