Added a new temporary EIP-712 half-bind mode

This commit is contained in:
Alexandre Paillier
2022-05-16 16:06:52 +02:00
parent a0551e8226
commit 239da44d0e
7 changed files with 74 additions and 2 deletions

View File

@@ -382,7 +382,21 @@ bool path_set_root(const char *const struct_name, uint8_t name_length)
// because the first field could be a struct type
path_update();
#ifdef HAVE_EIP712_HALF_BLIND
// Only show field for the domain
if (path_get_root_type() == ROOT_MESSAGE)
{
G_io_apdu_buffer[0] = 0x90;
G_io_apdu_buffer[1] = 0x00;
io_exchange(CHANNEL_APDU | IO_RETURN_AFTER_TX, 2);
}
else
{
#endif // HAVE_EIP712_HALF_BLIND
ui_712_new_root_struct(path_struct->root_struct);
#ifdef HAVE_EIP712_HALF_BLIND
}
#endif // HAVE_EIP712_HALF_BLIND
return true;
}