diff --git a/Makefile b/Makefile index dfd35fbe..4f28f170 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ GIT_DESCRIBE=$(shell git describe --tags --abbrev=8 --always --long --dirty 2>/d VERSION_TAG=$(shell echo $(GIT_DESCRIBE) | sed 's/^v//g') APPVERSION_M=1 APPVERSION_N=6 -APPVERSION_P=4 +APPVERSION_P=5 APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P) APPNAME = "Mina" diff --git a/src/menu_bagl.c b/src/menu_bagl.c index cad22f61..0cefb50b 100644 --- a/src/menu_bagl.c +++ b/src/menu_bagl.c @@ -7,15 +7,6 @@ static char blindsign_text[20]; -bool is_blindsign_enabled(void) { - return N_storage.blindsign_enabled == 0x01; -} - -void toggle_blindsign(void) { - uint8_t value = N_storage.blindsign_enabled ? 0x00 : 0x01; - nvm_write((void*)&N_storage.blindsign_enabled, &value, sizeof(value)); -} - static void update_blindsign_text(void) { if (is_blindsign_enabled()) { strcpy(blindsign_text, "Enabled"); diff --git a/src/menu_common.c b/src/menu_common.c new file mode 100644 index 00000000..5c9f8b5b --- /dev/null +++ b/src/menu_common.c @@ -0,0 +1,10 @@ +#include "menu.h" + +bool is_blindsign_enabled(void) { + return N_storage.blindsign_enabled == 0x01; +} + +void toggle_blindsign(void) { + uint8_t value = N_storage.blindsign_enabled ? 0x00 : 0x01; + nvm_write((void*)&N_storage.blindsign_enabled, &value, sizeof(value)); +} diff --git a/src/menu_nbgl.c b/src/menu_nbgl.c index fc0e6628..ddc47076 100644 --- a/src/menu_nbgl.c +++ b/src/menu_nbgl.c @@ -16,15 +16,6 @@ static const nbgl_contentInfoList_t infoList = { .infoContents = infoContents, }; -bool is_blindsign_enabled(void) { - return N_storage.blindsign_enabled == 0x01; -} - -void toggle_blindsign(void) { - uint8_t value = N_storage.blindsign_enabled ? 0x00 : 0x01; - nvm_write((void*)&N_storage.blindsign_enabled, &value, sizeof(value)); -} - enum { BLIND_SIGNING_TOKEN = FIRST_USER_TOKEN, }; diff --git a/src/utils.c b/src/utils.c index 9f19229a..e6064228 100644 --- a/src/utils.c +++ b/src/utils.c @@ -278,6 +278,9 @@ static const char HEX_CHARS[] = "0123456789abcdef"; void bytes_to_hex_display(char *out, size_t out_len, const uint8_t *in, size_t in_len) { + if (out == NULL || in == NULL || out_len == 0) { + return; + } // Convert bytes to hex string, reversing byte order for big-endian display for (size_t i = 0; i < in_len && (i * 2 + 1) < out_len; i++) { uint8_t byte = in[in_len - 1 - i]; // Reverse for big-endian display diff --git a/tests_zemu/snapshots/ap-mainmenu/00002.png b/tests_zemu/snapshots/ap-mainmenu/00002.png index 478717db..404650f7 100644 Binary files a/tests_zemu/snapshots/ap-mainmenu/00002.png and b/tests_zemu/snapshots/ap-mainmenu/00002.png differ diff --git a/tests_zemu/snapshots/fl-mainmenu/00002.png b/tests_zemu/snapshots/fl-mainmenu/00002.png index 9cebc321..f15d61bc 100644 Binary files a/tests_zemu/snapshots/fl-mainmenu/00002.png and b/tests_zemu/snapshots/fl-mainmenu/00002.png differ diff --git a/tests_zemu/snapshots/sp-mainmenu/00001.png b/tests_zemu/snapshots/sp-mainmenu/00001.png index 4059bcc7..5efc9f9a 100644 Binary files a/tests_zemu/snapshots/sp-mainmenu/00001.png and b/tests_zemu/snapshots/sp-mainmenu/00001.png differ diff --git a/tests_zemu/snapshots/sp-mainmenu/00011.png b/tests_zemu/snapshots/sp-mainmenu/00011.png index 4059bcc7..5efc9f9a 100644 Binary files a/tests_zemu/snapshots/sp-mainmenu/00011.png and b/tests_zemu/snapshots/sp-mainmenu/00011.png differ diff --git a/tests_zemu/snapshots/st-mainmenu/00002.png b/tests_zemu/snapshots/st-mainmenu/00002.png index dc5ca547..d0a1d864 100644 Binary files a/tests_zemu/snapshots/st-mainmenu/00002.png and b/tests_zemu/snapshots/st-mainmenu/00002.png differ diff --git a/tests_zemu/snapshots/x-mainmenu/00001.png b/tests_zemu/snapshots/x-mainmenu/00001.png index 4059bcc7..5efc9f9a 100644 Binary files a/tests_zemu/snapshots/x-mainmenu/00001.png and b/tests_zemu/snapshots/x-mainmenu/00001.png differ diff --git a/tests_zemu/snapshots/x-mainmenu/00011.png b/tests_zemu/snapshots/x-mainmenu/00011.png index 4059bcc7..5efc9f9a 100644 Binary files a/tests_zemu/snapshots/x-mainmenu/00011.png and b/tests_zemu/snapshots/x-mainmenu/00011.png differ diff --git a/tests_zemu/tests/standard.test.ts b/tests_zemu/tests/standard.test.ts index 8636727c..401a3070 100644 --- a/tests_zemu/tests/standard.test.ts +++ b/tests_zemu/tests/standard.test.ts @@ -65,7 +65,7 @@ describe('Standard', function () { const resp = await app.getAppVersion() console.log(resp) - expect(resp.version).toEqual('1.6.4') + expect(resp.version).toEqual('1.6.5') } finally { await sim.close() }