EIP712 signatures now computed on schema hash
This commit is contained in:
@@ -509,6 +509,14 @@ static bool verify_contract_name_signature(uint8_t dname_length,
|
||||
NULL,
|
||||
0);
|
||||
|
||||
// Schema hash
|
||||
cx_hash((cx_hash_t*)&hash_ctx,
|
||||
0,
|
||||
eip712_context->schema_hash,
|
||||
sizeof(eip712_context->schema_hash),
|
||||
NULL,
|
||||
0);
|
||||
|
||||
// Display name length
|
||||
cx_hash((cx_hash_t*)&hash_ctx,
|
||||
0,
|
||||
@@ -590,6 +598,14 @@ static bool verify_field_name_signature(uint8_t dname_length,
|
||||
NULL,
|
||||
0);
|
||||
|
||||
// Schema hash
|
||||
cx_hash((cx_hash_t*)&hash_ctx,
|
||||
0,
|
||||
eip712_context->schema_hash,
|
||||
sizeof(eip712_context->schema_hash),
|
||||
NULL,
|
||||
0);
|
||||
|
||||
if ((field_ptr = path_get_field()) == NULL)
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user