refactor: use ECDSA utils function for typed hash digest

This commit is contained in:
r4bbit 2023-09-26 10:41:07 +02:00
parent ada12df49f
commit ed9dcfc602
1 changed files with 1 additions and 1 deletions

View File

@ -1410,6 +1410,6 @@ contract SigUtils {
// computes the hash of the fully encoded EIP-712 message for the domain, which can be used to recover the signer // computes the hash of the fully encoded EIP-712 message for the domain, which can be used to recover the signer
function getTypedDataHash(Permit memory _permit) public view returns (bytes32) { function getTypedDataHash(Permit memory _permit) public view returns (bytes32) {
return keccak256(abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, getStructHash(_permit))); return ECDSA.toTypedDataHash(DOMAIN_SEPARATOR, getStructHash(_permit));
} }
} }