diff --git a/src/handler/sign_tx.c b/src/handler/sign_tx.c index 6a6b44b..a4c68e8 100644 --- a/src/handler/sign_tx.c +++ b/src/handler/sign_tx.c @@ -81,7 +81,7 @@ int handler_sign_tx(buffer_t *cdata, uint8_t chunk, bool more) { parser_status_e status = transaction_deserialize(&buf, &G_context.tx_info.transaction); PRINTF("Parsing status: %d.\n", status); if (status != PARSING_OK) { - return io_send_sw(SW_TX_PARSING_FAIL); + return io_send_sw(SW_TX_PARSING_FAIL + status); } // Hash diff --git a/src/sw.h b/src/sw.h index 1bc8c20..305eff9 100644 --- a/src/sw.h +++ b/src/sw.h @@ -47,7 +47,7 @@ /** * Status word for fail of transaction parsing. */ -#define SW_TX_PARSING_FAIL 0xB005 +#define SW_TX_PARSING_FAIL 0xB010 /** * Status word for fail of transaction hash. */ diff --git a/src/transaction/types.h b/src/transaction/types.h index 9172ca0..f09fb8b 100644 --- a/src/transaction/types.h +++ b/src/transaction/types.h @@ -8,7 +8,7 @@ #define MAX_MEMO_LEN 465 // 510 - ADDRESS_LEN - 2*SIZE(U64) - SIZE(MAX_VARINT) typedef enum { - PARSING_OK = 1, + PARSING_OK = 0, SEQ_PARSING_ERROR = -1, TIMEOUT_PARSING_ERROR = -2, TO_PARSING_ERROR = -3,