diff --git a/app/src/evm/tx_eth.c b/app/src/evm/tx_eth.c index 203bbe2..911b830 100644 --- a/app/src/evm/tx_eth.c +++ b/app/src/evm/tx_eth.c @@ -26,7 +26,7 @@ static parser_context_t ctx_parsed_tx; -const char *tx_parse_eth() { +const char *tx_parse_eth(uint8_t *error_code) { uint8_t err = parser_parse_eth(&ctx_parsed_tx, tx_get_buffer(), tx_get_buffer_length()); CHECK_APP_CANARY() @@ -38,6 +38,7 @@ const char *tx_parse_eth() { err = parser_validate_eth(&ctx_parsed_tx); CHECK_APP_CANARY() + *error_code = err; if (err != parser_ok) { return parser_getErrorDescription(err); } diff --git a/app/src/evm/tx_eth.h b/app/src/evm/tx_eth.h index 57193a5..6d9d323 100644 --- a/app/src/evm/tx_eth.h +++ b/app/src/evm/tx_eth.h @@ -22,7 +22,7 @@ /// Parse message stored in transaction buffer /// This function should be called as soon as full buffer data is loaded. /// \return It returns NULL if data is valid or error message otherwise. -const char *tx_parse_eth(); +const char *tx_parse_eth(uint8_t *error_code); /// Return the number of items in the transaction zxerr_t tx_getNumItemsEth(uint8_t *num_items);