mirror of https://github.com/vacp2p/minime.git
refactor: use ECDSA utils function for typed hash digest
This commit is contained in:
parent
ada12df49f
commit
ed9dcfc602
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue