mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-30 09:11:07 +00:00
feat(legacy): Introduce post-message cleanup.
This commit is contained in:
parent
a1afadfd01
commit
0b3216146e
@ -416,6 +416,16 @@ void fsm_abortWorkflows(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void fsm_postMsgCleanup(MessageType message_type) {
|
||||
if (message_type != MessageType_MessageType_DoPreauthorized) {
|
||||
authorization_type = 0;
|
||||
}
|
||||
|
||||
if (message_type != MessageType_MessageType_UnlockPath) {
|
||||
unlock_path = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool fsm_layoutPathWarning(void) {
|
||||
layoutDialogSwipe(&bmp_icon_warning, _("Abort"), _("Continue"), NULL,
|
||||
_("Wrong address path"), _("for selected coin."), NULL,
|
||||
|
@ -161,5 +161,6 @@ bool fsm_getOwnershipId(uint8_t *script_pubkey, size_t script_pubkey_size,
|
||||
uint8_t ownership_id[32]);
|
||||
|
||||
void fsm_abortWorkflows(void);
|
||||
void fsm_postMsgCleanup(MessageType message_type);
|
||||
|
||||
#endif
|
||||
|
@ -62,6 +62,7 @@ void MessageProcessFunc(char type, char dir, uint16_t msg_id, void *ptr) {
|
||||
while (m->type) {
|
||||
if (type == m->type && dir == m->dir && msg_id == m->msg_id) {
|
||||
m->process_func(ptr);
|
||||
fsm_postMsgCleanup(msg_id);
|
||||
return;
|
||||
}
|
||||
m++;
|
||||
|
Loading…
Reference in New Issue
Block a user