mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 14:58:09 +00:00
Reorder fsm.c for logical grouping of signing methods
This commit is contained in:
parent
a031b79e24
commit
9c7e41f15b
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user