Now uses some of the old EIP712 code as common code between the two implementations + approve/reject button now works

This commit is contained in:
Alexandre Paillier
2022-05-12 17:30:04 +02:00
parent 9f29a7caa2
commit 9cd39e2c02
10 changed files with 61 additions and 55 deletions

View File

@@ -53,12 +53,14 @@
#endif
#define OFFSET_CLA 0
#define OFFSET_INS 1
#define OFFSET_P1 2
#define OFFSET_P2 3
#define OFFSET_LC 4
#define OFFSET_CDATA 5
enum {
OFFSET_CLA = 0,
OFFSET_INS,
OFFSET_P1,
OFFSET_P2,
OFFSET_LC,
OFFSET_CDATA
};
void handleGetPublicKey(uint8_t p1,
uint8_t p2,
@@ -99,7 +101,7 @@ void handleSignPersonalMessage(uint8_t p1,
void handleSignEIP712Message_v0(uint8_t p1,
uint8_t p2,
const uint8_t *dataBuffer,
uint16_t dataLength,
uint8_t dataLength,
unsigned int *flags,
unsigned int *tx);

View File

@@ -675,6 +675,7 @@ void handleApdu(unsigned int *flags, unsigned int *tx) {
}
else
{
*flags |= IO_ASYNCH_REPLY;
handle_eip712_sign(G_io_apdu_buffer);
}
break;

View File

@@ -14,8 +14,6 @@ unsigned int io_seproxyhal_touch_signMessage_ok(const bagl_element_t *e);
unsigned int io_seproxyhal_touch_signMessage_cancel(const bagl_element_t *e);
unsigned int io_seproxyhal_touch_data_ok(const bagl_element_t *e);
unsigned int io_seproxyhal_touch_data_cancel(const bagl_element_t *e);
unsigned int io_seproxyhal_touch_signMessage712_v0_ok(const bagl_element_t *e);
unsigned int io_seproxyhal_touch_signMessage712_v0_cancel(const bagl_element_t *e);
unsigned int io_seproxyhal_touch_eth2_address_ok(const bagl_element_t *e);
unsigned int io_seproxyhal_touch_privacy_ok(const bagl_element_t *e);
unsigned int io_seproxyhal_touch_privacy_cancel(const bagl_element_t *e);