Now initializes field hash struct in eip712 context

This commit is contained in:
Alexandre Paillier
2022-04-28 16:47:48 +02:00
parent 83dda443f4
commit a2a72edf83
3 changed files with 9 additions and 2 deletions

View File

@@ -9,7 +9,7 @@
static s_field_hashing *fh = NULL;
static bool field_hash_init(void)
bool field_hash_init(void)
{
if (fh == NULL)
{
@@ -35,7 +35,7 @@ const uint8_t *field_hash(const uint8_t *data,
uint8_t *hash_ptr = NULL;
(void)data;
if ((fh == NULL) && (field_hash_init() == false))
if (fh == NULL)
{
return NULL;
}