From c8cf72978b2ce52e47647a91a4fe206633d73346 Mon Sep 17 00:00:00 2001 From: Aido Date: Fri, 6 Sep 2024 23:08:22 +0100 Subject: [PATCH] Fix number of buttons on Stax 'Select Tool' page --- src/stax/ui_stax.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/stax/ui_stax.c b/src/stax/ui_stax.c index b800af8..2d8038b 100644 --- a/src/stax/ui_stax.c +++ b/src/stax/ui_stax.c @@ -65,7 +65,7 @@ enum select_tool { SELECT_TOOL_NB_CHILDREN }; -#define SELECT_TOOL_NB_BUTTONS 4 +#define SELECT_TOOL_NB_BUTTONS 3 static const char *toolType[] = {"BIP39 Check", "SSKR Check", "BIP85 Generate"}; static void select_tool_callback(nbgl_obj_t *obj, nbgl_touchType_t eventType) { @@ -185,7 +185,8 @@ enum select_bip39_phrase_length { SELECT_BIP39_PHRASE_LENGTH_BUTTON_18_INDEX, SELECT_BIP39_PHRASE_LENGTH_BUTTON_24_INDEX, SELECT_BIP39_PHRASE_LENGTH_BACK_BUTTON_INDEX, - SELECT_BIP39_PHRASE_LENGTH_KBD_TEXT_TOKEN, + SELECT_BIP39_PHRASE_LENGTH_NB_CHILDREN, + KBD_TEXT_TOKEN }; #define SELECT_BIP39_PHRASE_LENGTH_NB_BUTTONS 3 @@ -217,7 +218,7 @@ static void display_bip39_select_phrase_length_page(void) { // 3 buttons + icon + text + subText nbgl_screenSet(&screenChildren, - 6, + SELECT_BIP39_PHRASE_LENGTH_NB_CHILDREN, NULL, (nbgl_touchCallback_t) &select_bip39_phrase_length_callback); @@ -388,7 +389,7 @@ static void display_check_keyboard_page() { ? bip39_mnemonic_current_word_number_get() + 1 : sskr_shares_current_word_number_get() + 1; kbdContent.grayedOut = false; - kbdContent.textToken = SELECT_BIP39_PHRASE_LENGTH_KBD_TEXT_TOKEN; + kbdContent.textToken = KBD_TEXT_TOKEN; kbdContent.suggestionButtons.buttons = buttonTexts; kbdContent.suggestionButtons.firstButtonToken = CHECK_FIRST_SUGGESTION_TOKEN; kbdContent.suggestionButtons.nbUsedButtons = 0; // no used buttons at start-up