Now only compiles full EIP-712 support for capable devices

This commit is contained in:
Alexandre Paillier
2022-05-16 10:59:20 +02:00
parent b9820774ba
commit 2fa6379470
26 changed files with 109 additions and 6 deletions

View File

@@ -675,8 +675,12 @@ void handleApdu(unsigned int *flags, unsigned int *tx) {
}
else
{
#ifdef HAVE_EIP712_FULL_SUPPORT
*flags |= IO_ASYNCH_REPLY;
handle_eip712_sign(G_io_apdu_buffer);
#else
THROW(0x6B00);
#endif // HAVE_EIP712_FULL_SUPPORT
}
break;
@@ -703,6 +707,7 @@ void handleApdu(unsigned int *flags, unsigned int *tx) {
#endif
#ifdef HAVE_EIP712_FULL_SUPPORT
case INS_EIP712_STRUCT_DEF:
*flags |= IO_ASYNCH_REPLY;
handle_eip712_struct_def(G_io_apdu_buffer);
@@ -712,6 +717,7 @@ void handleApdu(unsigned int *flags, unsigned int *tx) {
*flags |= IO_ASYNCH_REPLY;
handle_eip712_struct_impl(G_io_apdu_buffer);
break;
#endif // HAVE_EIP712_FULL_SUPPORT
#if 0
case 0xFF: // return to dashboard