15
15
16
16
enum {
17
17
BLIND_SIGNING_TOKEN = FIRST_USER_TOKEN ,
18
- DEBUG_TOKEN ,
18
+ #ifdef HAVE_DOMAIN_NAME
19
+ DOMAIN_NAME_VERBOSE_TOKEN ,
20
+ #endif
19
21
NONCE_TOKEN ,
20
22
#ifdef HAVE_EIP712_FULL_SUPPORT
21
23
EIP712_VERBOSE_TOKEN ,
22
24
#endif
23
- #ifdef HAVE_DOMAIN_NAME
24
- DOMAIN_NAME_VERBOSE_TOKEN
25
- #endif
25
+ DEBUG_TOKEN ,
26
26
};
27
27
28
28
enum {
29
29
BLIND_SIGNING_ID ,
30
30
#ifdef HAVE_DOMAIN_NAME
31
31
DOMAIN_NAME_VERBOSE_ID ,
32
32
#endif
33
+ NONCE_ID ,
33
34
#ifdef HAVE_EIP712_FULL_SUPPORT
34
35
EIP712_VERBOSE_ID ,
35
36
#endif
36
- NONCE_ID ,
37
37
DEBUG_ID ,
38
38
SETTINGS_SWITCHES_NB
39
39
};
@@ -61,11 +61,13 @@ static void setting_toggle_callback(int token, uint8_t index, int page) {
61
61
switches [BLIND_SIGNING_ID ].initState = (nbgl_state_t ) value ;
62
62
nvm_write ((void * ) & N_storage .dataAllowed , (void * ) & value , sizeof (value ));
63
63
break ;
64
- case DEBUG_TOKEN :
65
- value = !N_storage .contractDetails ;
66
- switches [DEBUG_ID ].initState = (nbgl_state_t ) value ;
67
- nvm_write ((void * ) & N_storage .contractDetails , (void * ) & value , sizeof (value ));
64
+ #ifdef HAVE_DOMAIN_NAME
65
+ case DOMAIN_NAME_VERBOSE_TOKEN :
66
+ value = !N_storage .verbose_domain_name ;
67
+ switches [DOMAIN_NAME_VERBOSE_ID ].initState = (nbgl_state_t ) value ;
68
+ nvm_write ((void * ) & N_storage .verbose_domain_name , (void * ) & value , sizeof (value ));
68
69
break ;
70
+ #endif // HAVE_DOMAIN_NAME
69
71
case NONCE_TOKEN :
70
72
value = !N_storage .displayNonce ;
71
73
switches [NONCE_ID ].initState = (nbgl_state_t ) value ;
@@ -78,13 +80,11 @@ static void setting_toggle_callback(int token, uint8_t index, int page) {
78
80
nvm_write ((void * ) & N_storage .verbose_eip712 , (void * ) & value , sizeof (value ));
79
81
break ;
80
82
#endif // HAVE_EIP712_FULL_SUPPORT
81
- #ifdef HAVE_DOMAIN_NAME
82
- case DOMAIN_NAME_VERBOSE_TOKEN :
83
- value = !N_storage .verbose_domain_name ;
84
- switches [DOMAIN_NAME_VERBOSE_ID ].initState = (nbgl_state_t ) value ;
85
- nvm_write ((void * ) & N_storage .verbose_domain_name , (void * ) & value , sizeof (value ));
83
+ case DEBUG_TOKEN :
84
+ value = !N_storage .contractDetails ;
85
+ switches [DEBUG_ID ].initState = (nbgl_state_t ) value ;
86
+ nvm_write ((void * ) & N_storage .contractDetails , (void * ) & value , sizeof (value ));
86
87
break ;
87
- #endif // HAVE_DOMAIN_NAME
88
88
}
89
89
}
90
90
@@ -132,6 +132,12 @@ static void prepare_and_display_home(const char *appname, const char *tagline, u
132
132
switches [DOMAIN_NAME_VERBOSE_ID ].tuneId = TUNE_TAP_CASUAL ;
133
133
#endif // HAVE_DOMAIN_NAME
134
134
135
+ switches [NONCE_ID ].initState = N_storage .displayNonce ? ON_STATE : OFF_STATE ;
136
+ switches [NONCE_ID ].text = "Nonce" ;
137
+ switches [NONCE_ID ].subText = "Display nonce in transactions." ;
138
+ switches [NONCE_ID ].token = NONCE_TOKEN ;
139
+ switches [NONCE_ID ].tuneId = TUNE_TAP_CASUAL ;
140
+
135
141
#ifdef HAVE_EIP712_FULL_SUPPORT
136
142
switches [EIP712_VERBOSE_ID ].initState = N_storage .verbose_eip712 ? ON_STATE : OFF_STATE ;
137
143
switches [EIP712_VERBOSE_ID ].text = "Raw messages" ;
@@ -140,12 +146,6 @@ static void prepare_and_display_home(const char *appname, const char *tagline, u
140
146
switches [EIP712_VERBOSE_ID ].tuneId = TUNE_TAP_CASUAL ;
141
147
#endif // HAVE_EIP712_FULL_SUPPORT
142
148
143
- switches [NONCE_ID ].initState = N_storage .displayNonce ? ON_STATE : OFF_STATE ;
144
- switches [NONCE_ID ].text = "Nonce" ;
145
- switches [NONCE_ID ].subText = "Display nonce in transactions." ;
146
- switches [NONCE_ID ].token = NONCE_TOKEN ;
147
- switches [NONCE_ID ].tuneId = TUNE_TAP_CASUAL ;
148
-
149
149
switches [DEBUG_ID ].initState = N_storage .contractDetails ? ON_STATE : OFF_STATE ;
150
150
switches [DEBUG_ID ].text = "Debug smart contracts" ;
151
151
switches [DEBUG_ID ].subText = "Display contract data details." ;
0 commit comments