From 2ce0c8f188a4204e5a447845b625ca65cd2fc320 Mon Sep 17 00:00:00 2001 From: matejcik Date: Wed, 1 Sep 2021 12:37:12 +0200 Subject: [PATCH] fix(legacy): make use of Ethereum required fields --- legacy/firmware/ethereum.c | 6 +----- legacy/firmware/fsm_msg_ethereum.h | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/legacy/firmware/ethereum.c b/legacy/firmware/ethereum.c index bcc417b38..ef898641e 100644 --- a/legacy/firmware/ethereum.c +++ b/legacy/firmware/ethereum.c @@ -386,10 +386,6 @@ static void layoutEthereumFee(const uint8_t *value, uint32_t value_len, */ static bool ethereum_signing_check(const EthereumSignTx *msg) { - if (!msg->has_gas_price || !msg->has_gas_limit) { - return false; - } - size_t tolen = msg->has_to ? strlen(msg->to) : 0; if (tolen != 42 && tolen != 40 && tolen != 0) { @@ -589,7 +585,7 @@ void ethereum_signing_txack(const EthereumTxAck *tx) { return; } - if (data_left > 0 && (!tx->has_data_chunk || tx->data_chunk.size == 0)) { + if (data_left > 0 && tx->data_chunk.size == 0) { fsm_sendFailure(FailureType_Failure_DataError, _("Empty data chunk received")); ethereum_signing_abort(); diff --git a/legacy/firmware/fsm_msg_ethereum.h b/legacy/firmware/fsm_msg_ethereum.h index 82d4fa4d5..f0eee1ebb 100644 --- a/legacy/firmware/fsm_msg_ethereum.h +++ b/legacy/firmware/fsm_msg_ethereum.h @@ -155,9 +155,6 @@ void fsm_msgEthereumSignMessage(const EthereumSignMessage *msg) { } void fsm_msgEthereumVerifyMessage(const EthereumVerifyMessage *msg) { - CHECK_PARAM(msg->has_address, _("No address provided")); - CHECK_PARAM(msg->has_message, _("No message provided")); - if (ethereum_message_verify(msg) != 0) { fsm_sendFailure(FailureType_Failure_DataError, _("Invalid signature")); return;