Skip to content

Commit e28dbbf

Browse files
ui_settings HAVE_EIP712_FULL_SUPPORT inconsistency
1 parent 651dcc9 commit e28dbbf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src_nbgl/ui_settings.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,14 @@ static bool navCallback(uint8_t page, nbgl_pageContent_t* content) {
5656
break;
5757

5858
case 2:
59+
#ifdef HAVE_EIP712_FULL_SUPPORT
5960
switches[index++] =
6061
(nbgl_layoutSwitch_t){.initState = N_storage.verbose_eip712 ? ON_STATE : OFF_STATE,
6162
.text = "Verbose EIP712",
6263
.subText = "Ignore filtering and\ndisplay raw content",
6364
.token = EIP712_VERBOSE_TOKEN,
6465
.tuneId = TUNE_TAP_CASUAL};
66+
#endif // HAVE_EIP712_FULL_SUPPORT
6567
#ifdef HAVE_DOMAIN_NAME
6668
switches[index++] = (nbgl_layoutSwitch_t){
6769
.initState = N_storage.verbose_domain_name ? ON_STATE : OFF_STATE,
@@ -116,5 +118,9 @@ static void controlsCallback(int token, uint8_t index) {
116118
}
117119

118120
void ui_menu_settings(void) {
119-
nbgl_useCaseSettings(APPNAME " settings", 0, 3, false, ui_idle, navCallback, controlsCallback);
121+
uint8_t nb_screens = 2;
122+
#ifdef HAVE_EIP712_FULL_SUPPORT || HAVE_DOMAIN_NAME
123+
nb_screens += 1;
124+
#endif
125+
nbgl_useCaseSettings(APPNAME " settings", 0, nb_screens, false, ui_idle, navCallback, controlsCallback);
120126
}

0 commit comments

Comments
 (0)