fix(legacy): make use of Ethereum required fields

pull/1804/head
matejcik 3 years ago committed by matejcik
parent e80077e0a4
commit 2ce0c8f188

@ -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();

@ -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;

Loading…
Cancel
Save