diff --git a/firmware/fsm.c b/firmware/fsm.c index 3640fbfac3..3ab2304374 100644 --- a/firmware/fsm.c +++ b/firmware/fsm.c @@ -419,6 +419,22 @@ void fsm_msgSignTx(SignTx *msg) signing_init(msg->inputs_count, msg->outputs_count, coin, node, msg->version, msg->lock_time); } +void fsm_msgTxAck(TxAck *msg) +{ + if (msg->has_tx) { + signing_txack(&(msg->tx)); + } else { + fsm_sendFailure(FailureType_Failure_SyntaxError, "No transaction provided"); + } +} + +void fsm_msgCancel(Cancel *msg) +{ + (void)msg; + recovery_abort(); + signing_abort(); + fsm_sendFailure(FailureType_Failure_ActionCancelled, "Aborted"); +} void fsm_msgEthereumSignTx(EthereumSignTx *msg) { @@ -432,23 +448,6 @@ void fsm_msgEthereumTxAck(EthereumTxAck *msg) fsm_sendFailure(FailureType_Failure_Other, "Unsupported feature"); } -void fsm_msgCancel(Cancel *msg) -{ - (void)msg; - recovery_abort(); - signing_abort(); - fsm_sendFailure(FailureType_Failure_ActionCancelled, "Aborted"); -} - -void fsm_msgTxAck(TxAck *msg) -{ - if (msg->has_tx) { - signing_txack(&(msg->tx)); - } else { - fsm_sendFailure(FailureType_Failure_SyntaxError, "No transaction provided"); - } -} - void fsm_msgCipherKeyValue(CipherKeyValue *msg) { if (!storage_isInitialized()) {