From ed9dcfc602c6a9df55598fc5f536ec0ea888e80d Mon Sep 17 00:00:00 2001 From: r4bbit <445106+0x-r4bbit@users.noreply.github.com> Date: Tue, 26 Sep 2023 10:41:07 +0200 Subject: [PATCH] refactor: use ECDSA utils function for typed hash digest --- test/MiniMeToken.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/MiniMeToken.t.sol b/test/MiniMeToken.t.sol index 88392d4..770031b 100644 --- a/test/MiniMeToken.t.sol +++ b/test/MiniMeToken.t.sol @@ -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 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)); } }