From 87f23349add57f55f44afd6ff20a99a732a01ad7 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Thu, 9 Feb 2023 11:30:42 +0100 Subject: [PATCH] Fix freeze on slow/unresponsive APDU transport --- src_bagl/ui_flow_signMessage.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src_bagl/ui_flow_signMessage.c b/src_bagl/ui_flow_signMessage.c index 9b97d57..e1eed03 100644 --- a/src_bagl/ui_flow_signMessage.c +++ b/src_bagl/ui_flow_signMessage.c @@ -19,6 +19,9 @@ static void dummy_pre_cb(void) { static void dummy_post_cb(void) { if (ui_pos == UI_191_POS_QUESTION) { continue_displaying_message(); + // temporarily disable button clicks, they will be re-enabled as soon as new data + // is received and the page is redrawn with ux_flow_init() + G_ux.stack[0].button_push_callback = NULL; } else // UI_191_END { ui_191_switch_to_message_end(); @@ -55,6 +58,7 @@ UX_STEP_CB( #else nnn, #endif + G_ux.stack[0].button_push_callback = NULL; // disable button clicks skip_rest_of_message(), { #ifndef TARGET_NANOS