Skip to content

Commit 33865ce

Browse files
authored
Merge pull request #164 from Zondax/required_bls_ui
Add go to settings callback
2 parents 8cbcc06 + a1e4c01 commit 33865ce

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

app/ui/view_internal.h

+2
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ void view_message_impl(const char *title, const char *message);
207207

208208
void view_error_show_impl();
209209

210+
void view_settings_show_impl();
211+
210212
void view_custom_error_show_impl();
211213

212214
void view_blindsign_error_show_impl();

app/ui/view_nbgl.c

+21-2
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@ static void h_blindsign_toggle() { app_mode_set_blindsign(!app_mode_blindsign())
9494

9595
static void confirm_error(__Z_UNUSED bool confirm) { h_error_accept(0); }
9696

97+
static void goto_settings(bool confirm) {
98+
if (confirm) {
99+
view_settings_show_impl();
100+
} else {
101+
view_idle_show_impl(0, NULL);
102+
}
103+
UX_WAIT();
104+
app_reply_error();
105+
}
106+
97107
static void reviewAddressChoice(bool confirm) {
98108
if (confirm) {
99109
nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_VERIFIED, h_approve_internal);
@@ -154,14 +164,23 @@ void view_custom_error_show(const char *upper, const char *lower) {
154164
}
155165

156166
void view_blindsign_error_show() {
157-
nbgl_useCaseChoice(&C_Warning_64px, "This message cannot\nbe clear-signed",
158-
"Enable blind-signing in\nthe settings to sign\nthis transaction.", "Exit", "", confirm_error);
167+
nbgl_useCaseChoice(&C_Warning_64px,
168+
"This transaction cannot\nbe clear-signed",
169+
"Enable blind signing in the\nsettings to sign this\ntransaction.",
170+
"Go to settings",
171+
"Reject Transaction",
172+
goto_settings);
159173
}
160174

161175
void view_error_show_impl() {
162176
nbgl_useCaseChoice(&C_Important_Circle_64px, viewdata.key, viewdata.value, "Ok", NULL, confirm_setting);
163177
}
164178

179+
void view_settings_show_impl() {
180+
nbgl_useCaseHomeAndSettings(MENU_MAIN_APP_LINE1, &C_icon_stax_64, HOME_TEXT, 0, &settingContents,
181+
&infoList, NULL, app_quit);
182+
}
183+
165184
static uint8_t get_pair_number() {
166185
uint8_t numItems = 0;
167186
uint8_t numPairs = 0;

include/zxversion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
#pragma once
1717

1818
#define ZXLIB_MAJOR 31
19-
#define ZXLIB_MINOR 0
19+
#define ZXLIB_MINOR 1
2020
#define ZXLIB_PATCH 0

0 commit comments

Comments
 (0)