Skip to content

Commit

Permalink
Merge pull request #96 from trilitech/palmer@functori@force-pin-requi…
Browse files Browse the repository at this point in the history
…rement-at-app-exit

Fix exit without pin code on caller disconnection
  • Loading branch information
spalmer25 authored Apr 5, 2024
2 parents 1096c49 + 0c448d2 commit e883538
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void ui_initial_screen(void);
* @brief Exits the app
*
*/
void exit_app(void);
void __attribute__((noreturn)) app_exit(void);

#ifdef HAVE_BAGL

Expand Down
2 changes: 1 addition & 1 deletion src/ui_bagl.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ UX_STEP_NOCB(ux_version_step, bnnn_paging, {"Tezos Baking", APPVERSION});
UX_STEP_NOCB(ux_chain_id_step, bnnn_paging, {"Chain", home_context.chain_id});
UX_STEP_NOCB(ux_authorized_key_step, bnnn_paging, {"Public Key Hash", home_context.authorized_key});
UX_STEP_NOCB(ux_hwm_step, bnnn_paging, {"High Watermark", home_context.hwm});
UX_STEP_CB(ux_idle_quit_step, pb, exit_app(), {&C_icon_dashboard_x, "Quit"});
UX_STEP_CB(ux_idle_quit_step, pb, app_exit(), {&C_icon_dashboard_x, "Quit"});

UX_FLOW(ux_idle_flow,
&ux_app_is_ready_step,
Expand Down
2 changes: 1 addition & 1 deletion src/ui_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static void require_pin(void) {
os_global_pin_invalidate();
}

void exit_app(void) {
void __attribute__((noreturn)) app_exit(void) {
require_pin();
os_sched_exit(-1);
}
2 changes: 1 addition & 1 deletion src/ui_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ static void ui_menu_about_baking(void) {
}

void ui_initial_screen(void) {
nbgl_useCaseHome("Tezos Baking", &C_tezos, NULL, false, ui_menu_about_baking, exit_app);
nbgl_useCaseHome("Tezos Baking", &C_tezos, NULL, false, ui_menu_about_baking, app_exit);
}

#endif // HAVE_NBGL

0 comments on commit e883538

Please sign in to comment.