Skip to content

Commit

Permalink
Fixing Nano X UI
Browse files Browse the repository at this point in the history
  • Loading branch information
jleni committed May 9, 2020
1 parent 68f32d7 commit 4daf17f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ DEFINES += HAVE_BAGL_FONT_OPEN_SANS_REGULAR_11PX
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_EXTRABOLD_11PX
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX

#DEFINES += HAVE_UX_FLOW
DEFINES += HAVE_UX_FLOW

#SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl
SDK_SOURCE_PATH += lib_ux
Expand Down
18 changes: 16 additions & 2 deletions app/src/view_custom.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
#include <stdio.h>

view_error_t view_printAddr() {
#if !defined(HAVE_UX_FLOW)
if (viewdata.addrKind != addr_secp256k1 &&
viewdata.addrKind != addr_sapling) {
return view_error_detected;
}

#if !defined(HAVE_UX_FLOW)

char *p = NULL;
switch (viewdata.addrKind) {
case addr_secp256k1: {
Expand All @@ -53,7 +54,20 @@ view_error_t view_printAddr() {
return view_error_detected;
}
#else
snprintf(viewdata.addr, MAX_CHARS_ADDR, "%s", (char *) (G_io_apdu_buffer + VIEW_ADDRESS_BUFFER_OFFSET));
switch (viewdata.addrKind) {
case addr_secp256k1: {
h_paging_set_page_count(1);
snprintf(viewdata.addr, MAX_CHARS_ADDR, "%s", (char *) (G_io_apdu_buffer + VIEW_ADDRESS_OFFSET_SECP256K1));
break;
}
case addr_sapling: {
h_paging_set_page_count(1);
snprintf(viewdata.addr, MAX_CHARS_ADDR, "%s", (char *) (G_io_apdu_buffer + VIEW_ADDRESS_OFFSET_SAPLING));
break;
}
default:
return view_error_detected;
}
#endif
splitValueField();
return view_no_error;
Expand Down
2 changes: 1 addition & 1 deletion deps/ledger-zxlib/app/common/view_x.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void h_review_loop_start() {
if (flow_inside_loop) {
// coming from right
h_paging_decrease();
if (viewdata.idx<0) {
if (viewdata.itemIdx<0) {
// exit to the left
flow_inside_loop = 0;
ux_flow_prev();
Expand Down

0 comments on commit 4daf17f

Please sign in to comment.