diff --git a/Makefile b/Makefile index c5a912f..1c2c33e 100644 --- a/Makefile +++ b/Makefile @@ -44,7 +44,7 @@ APPVERSION = $(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)-dev # Application source files APP_SOURCE_PATH += src src_features src_plugins -ifeq ($(TARGET_NAME),TARGET_STAX) +ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_STAX TARGET_FLEX)) APP_SOURCE_PATH += src_nbgl else APP_SOURCE_PATH += src_bagl @@ -55,7 +55,7 @@ APP_SOURCE_FILES += ${BOLOS_SDK}/lib_standard_app/crypto_helpers.c APP_SOURCE_FILES += ${BOLOS_SDK}/lib_standard_app/format.c INCLUDES_PATH += ${BOLOS_SDK}/lib_standard_app -ifeq ($(TARGET_NAME),TARGET_STAX) +ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_STAX TARGET_FLEX)) NETWORK_ICONS_FILE = $(GEN_SRC_DIR)/net_icons.gen.c NETWORK_ICONS_DIR = $(shell dirname "$(NETWORK_ICONS_FILE)") @@ -71,12 +71,13 @@ ICON_NANOS = icons/nanos_app_chain_$(CHAIN_ID).gif ICON_NANOX = icons/nanox_app_chain_$(CHAIN_ID).gif ICON_NANOSP = icons/nanox_app_chain_$(CHAIN_ID).gif ICON_STAX = icons/stax_app_chain_$(CHAIN_ID).gif +ICON_FLEX = icons/flex_app_chain_$(CHAIN_ID).gif #prepare hsm generation -ifeq ($(TARGET_NAME),TARGET_STAX) - DEFINES += ICONGLYPH=C_stax_chain_$(CHAIN_ID)_64px - DEFINES += ICONBITMAP=C_stax_chain_$(CHAIN_ID)_64px_bitmap - DEFINES += ICONGLYPH_SMALL=C_stax_chain_$(CHAIN_ID) +ifeq ($(TARGET_NAME),$(filter $(TARGET_NAME),TARGET_STAX TARGET_FLEX)) + DEFINES += ICONGLYPH=C_chain_$(CHAIN_ID)_64px + DEFINES += ICONBITMAP=C_chain_$(CHAIN_ID)_64px_bitmap + DEFINES += ICONGLYPH_SMALL=C_chain_$(CHAIN_ID) endif diff --git a/icons/flex_app_chain_1.gif b/icons/flex_app_chain_1.gif new file mode 100644 index 0000000..f1c5e66 Binary files /dev/null and b/icons/flex_app_chain_1.gif differ diff --git a/icons/flex_app_chain_1030.gif b/icons/flex_app_chain_1030.gif new file mode 100644 index 0000000..6a4039d Binary files /dev/null and b/icons/flex_app_chain_1030.gif differ diff --git a/icons/flex_app_chain_108.gif b/icons/flex_app_chain_108.gif new file mode 100644 index 0000000..1a053ab Binary files /dev/null and b/icons/flex_app_chain_108.gif differ diff --git a/icons/flex_app_chain_1284.gif b/icons/flex_app_chain_1284.gif new file mode 100644 index 0000000..dd919fc Binary files /dev/null and b/icons/flex_app_chain_1284.gif differ diff --git a/icons/flex_app_chain_1285.gif b/icons/flex_app_chain_1285.gif new file mode 100644 index 0000000..f3ef9f4 Binary files /dev/null and b/icons/flex_app_chain_1285.gif differ diff --git a/icons/flex_app_chain_1313114.gif b/icons/flex_app_chain_1313114.gif new file mode 100644 index 0000000..59da10a Binary files /dev/null and b/icons/flex_app_chain_1313114.gif differ diff --git a/icons/flex_app_chain_137.gif b/icons/flex_app_chain_137.gif new file mode 100644 index 0000000..b49f73b Binary files /dev/null and b/icons/flex_app_chain_137.gif differ diff --git a/icons/flex_app_chain_1620.gif b/icons/flex_app_chain_1620.gif new file mode 100644 index 0000000..6815caf Binary files /dev/null and b/icons/flex_app_chain_1620.gif differ diff --git a/icons/flex_app_chain_1818.gif b/icons/flex_app_chain_1818.gif new file mode 100644 index 0000000..6af034e Binary files /dev/null and b/icons/flex_app_chain_1818.gif differ diff --git a/icons/flex_app_chain_19.gif b/icons/flex_app_chain_19.gif new file mode 100644 index 0000000..2e0061d Binary files /dev/null and b/icons/flex_app_chain_19.gif differ diff --git a/icons/flex_app_chain_1987.gif b/icons/flex_app_chain_1987.gif new file mode 100644 index 0000000..0c6c85a Binary files /dev/null and b/icons/flex_app_chain_1987.gif differ diff --git a/icons/flex_app_chain_199.gif b/icons/flex_app_chain_199.gif new file mode 100644 index 0000000..d7d9276 Binary files /dev/null and b/icons/flex_app_chain_199.gif differ diff --git a/icons/flex_app_chain_2.gif b/icons/flex_app_chain_2.gif new file mode 100644 index 0000000..b59d301 Binary files /dev/null and b/icons/flex_app_chain_2.gif differ diff --git a/icons/flex_app_chain_200625.gif b/icons/flex_app_chain_200625.gif new file mode 100644 index 0000000..3fdb32f Binary files /dev/null and b/icons/flex_app_chain_200625.gif differ diff --git a/icons/flex_app_chain_20531811.gif b/icons/flex_app_chain_20531811.gif new file mode 100644 index 0000000..8c09a8d Binary files /dev/null and b/icons/flex_app_chain_20531811.gif differ diff --git a/icons/flex_app_chain_20531812.gif b/icons/flex_app_chain_20531812.gif new file mode 100644 index 0000000..8c09a8d Binary files /dev/null and b/icons/flex_app_chain_20531812.gif differ diff --git a/icons/flex_app_chain_237.gif b/icons/flex_app_chain_237.gif new file mode 100644 index 0000000..224f867 Binary files /dev/null and b/icons/flex_app_chain_237.gif differ diff --git a/icons/flex_app_chain_24.gif b/icons/flex_app_chain_24.gif new file mode 100644 index 0000000..a4f59ce Binary files /dev/null and b/icons/flex_app_chain_24.gif differ diff --git a/icons/flex_app_chain_24484.gif b/icons/flex_app_chain_24484.gif new file mode 100644 index 0000000..d788dd2 Binary files /dev/null and b/icons/flex_app_chain_24484.gif differ diff --git a/icons/flex_app_chain_246.gif b/icons/flex_app_chain_246.gif new file mode 100644 index 0000000..8f29253 Binary files /dev/null and b/icons/flex_app_chain_246.gif differ diff --git a/icons/flex_app_chain_246529.gif b/icons/flex_app_chain_246529.gif new file mode 100644 index 0000000..18860a4 Binary files /dev/null and b/icons/flex_app_chain_246529.gif differ diff --git a/icons/flex_app_chain_246785.gif b/icons/flex_app_chain_246785.gif new file mode 100644 index 0000000..18860a4 Binary files /dev/null and b/icons/flex_app_chain_246785.gif differ diff --git a/icons/flex_app_chain_248.gif b/icons/flex_app_chain_248.gif new file mode 100644 index 0000000..9e5d67f Binary files /dev/null and b/icons/flex_app_chain_248.gif differ diff --git a/icons/flex_app_chain_269.gif b/icons/flex_app_chain_269.gif new file mode 100644 index 0000000..0368902 Binary files /dev/null and b/icons/flex_app_chain_269.gif differ diff --git a/icons/flex_app_chain_2894.gif b/icons/flex_app_chain_2894.gif new file mode 100644 index 0000000..03be8ea Binary files /dev/null and b/icons/flex_app_chain_2894.gif differ diff --git a/icons/flex_app_chain_30.gif b/icons/flex_app_chain_30.gif new file mode 100644 index 0000000..4400f05 Binary files /dev/null and b/icons/flex_app_chain_30.gif differ diff --git a/icons/flex_app_chain_31.gif b/icons/flex_app_chain_31.gif new file mode 100644 index 0000000..4400f05 Binary files /dev/null and b/icons/flex_app_chain_31.gif differ diff --git a/icons/flex_app_chain_31102.gif b/icons/flex_app_chain_31102.gif new file mode 100644 index 0000000..feceebf Binary files /dev/null and b/icons/flex_app_chain_31102.gif differ diff --git a/icons/flex_app_chain_3125659152.gif b/icons/flex_app_chain_3125659152.gif new file mode 100644 index 0000000..dd6b8fb Binary files /dev/null and b/icons/flex_app_chain_3125659152.gif differ diff --git a/icons/flex_app_chain_336.gif b/icons/flex_app_chain_336.gif new file mode 100644 index 0000000..1933788 Binary files /dev/null and b/icons/flex_app_chain_336.gif differ diff --git a/icons/flex_app_chain_50.gif b/icons/flex_app_chain_50.gif new file mode 100644 index 0000000..e2a694f Binary files /dev/null and b/icons/flex_app_chain_50.gif differ diff --git a/icons/flex_app_chain_51.gif b/icons/flex_app_chain_51.gif new file mode 100644 index 0000000..e2a694f Binary files /dev/null and b/icons/flex_app_chain_51.gif differ diff --git a/icons/flex_app_chain_56.gif b/icons/flex_app_chain_56.gif new file mode 100644 index 0000000..1dd9c54 Binary files /dev/null and b/icons/flex_app_chain_56.gif differ diff --git a/icons/flex_app_chain_592.gif b/icons/flex_app_chain_592.gif new file mode 100644 index 0000000..8115113 Binary files /dev/null and b/icons/flex_app_chain_592.gif differ diff --git a/icons/flex_app_chain_60.gif b/icons/flex_app_chain_60.gif new file mode 100644 index 0000000..e081140 Binary files /dev/null and b/icons/flex_app_chain_60.gif differ diff --git a/icons/flex_app_chain_61.gif b/icons/flex_app_chain_61.gif new file mode 100644 index 0000000..b4e93ab Binary files /dev/null and b/icons/flex_app_chain_61.gif differ diff --git a/icons/flex_app_chain_62621.gif b/icons/flex_app_chain_62621.gif new file mode 100644 index 0000000..c8dc407 Binary files /dev/null and b/icons/flex_app_chain_62621.gif differ diff --git a/icons/flex_app_chain_64.gif b/icons/flex_app_chain_64.gif new file mode 100644 index 0000000..99d70f0 Binary files /dev/null and b/icons/flex_app_chain_64.gif differ diff --git a/icons/flex_app_chain_66.gif b/icons/flex_app_chain_66.gif new file mode 100644 index 0000000..f1db75a Binary files /dev/null and b/icons/flex_app_chain_66.gif differ diff --git a/icons/flex_app_chain_7341.gif b/icons/flex_app_chain_7341.gif new file mode 100644 index 0000000..bf6bd61 Binary files /dev/null and b/icons/flex_app_chain_7341.gif differ diff --git a/icons/flex_app_chain_73799.gif b/icons/flex_app_chain_73799.gif new file mode 100644 index 0000000..78e1fb5 Binary files /dev/null and b/icons/flex_app_chain_73799.gif differ diff --git a/icons/flex_app_chain_76.gif b/icons/flex_app_chain_76.gif new file mode 100644 index 0000000..b3f48f7 Binary files /dev/null and b/icons/flex_app_chain_76.gif differ diff --git a/icons/flex_app_chain_7762959.gif b/icons/flex_app_chain_7762959.gif new file mode 100644 index 0000000..35e930a Binary files /dev/null and b/icons/flex_app_chain_7762959.gif differ diff --git a/icons/flex_app_chain_78.gif b/icons/flex_app_chain_78.gif new file mode 100644 index 0000000..7507998 Binary files /dev/null and b/icons/flex_app_chain_78.gif differ diff --git a/icons/flex_app_chain_8.gif b/icons/flex_app_chain_8.gif new file mode 100644 index 0000000..88bab22 Binary files /dev/null and b/icons/flex_app_chain_8.gif differ diff --git a/icons/flex_app_chain_82.gif b/icons/flex_app_chain_82.gif new file mode 100644 index 0000000..d7cd90b Binary files /dev/null and b/icons/flex_app_chain_82.gif differ diff --git a/icons/flex_app_chain_820.gif b/icons/flex_app_chain_820.gif new file mode 100644 index 0000000..86a2c5a Binary files /dev/null and b/icons/flex_app_chain_820.gif differ diff --git a/icons/flex_app_chain_846000.gif b/icons/flex_app_chain_846000.gif new file mode 100644 index 0000000..c7babb5 Binary files /dev/null and b/icons/flex_app_chain_846000.gif differ diff --git a/icons/flex_app_chain_88.gif b/icons/flex_app_chain_88.gif new file mode 100644 index 0000000..e379af4 Binary files /dev/null and b/icons/flex_app_chain_88.gif differ diff --git a/icons/flex_app_chain_888.gif b/icons/flex_app_chain_888.gif new file mode 100644 index 0000000..585536a Binary files /dev/null and b/icons/flex_app_chain_888.gif differ diff --git a/icons/flex_app_chain_99.gif b/icons/flex_app_chain_99.gif new file mode 100644 index 0000000..cd615c5 Binary files /dev/null and b/icons/flex_app_chain_99.gif differ diff --git a/icons/nanos_app_chain_401697.gif b/icons/nanos_app_chain_401697.gif deleted file mode 100644 index d15c937..0000000 Binary files a/icons/nanos_app_chain_401697.gif and /dev/null differ diff --git a/icons/stax_app_chain_401697.gif b/icons/stax_app_chain_401697.gif deleted file mode 100644 index cd3e946..0000000 Binary files a/icons/stax_app_chain_401697.gif and /dev/null differ diff --git a/ledger_app.toml b/ledger_app.toml index 5c2fe30..1636e4d 100644 --- a/ledger_app.toml +++ b/ledger_app.toml @@ -1,7 +1,7 @@ [app] build_directory = "./" sdk = "C" -devices = ["nanos", "nanox", "nanos+", "stax"] +devices = ["nanos", "nanox", "nanos+", "stax", "flex"] [use_cases] # Coherent build options that make sense for your application debug = "DEBUG=1" diff --git a/src_nbgl/ui_approve_tx.c b/src_nbgl/ui_approve_tx.c index 7e2f59d..8abcdf1 100644 --- a/src_nbgl/ui_approve_tx.c +++ b/src_nbgl/ui_approve_tx.c @@ -155,7 +155,7 @@ static void pageCallback(int token, uint8_t index) { static void reviewContinue(void) { if (tx_approval_context.blindSigning) { nbgl_pageInfoDescription_t info = { - .centeredInfo.icon = &C_round_warning_64px, + .centeredInfo.icon = &C_Important_Circle_64px, .centeredInfo.text1 = "Blind Signing", .centeredInfo.text2 = "This transaction cannot be\nsecurely interpreted by Ledger\nStax. It might put " diff --git a/src_nbgl/ui_message_signing.c b/src_nbgl/ui_message_signing.c index 51e1a7e..40544df 100644 --- a/src_nbgl/ui_message_signing.c +++ b/src_nbgl/ui_message_signing.c @@ -33,7 +33,7 @@ void ui_message_start(const char *title, void (*rejected_func)(void)) { g_approved_func = approved_func; g_rejected_func = rejected_func; - nbgl_useCaseReviewStart(&C_Message_64px, + nbgl_useCaseReviewStart(&C_Review_64px, title, NULL, REJECT_BUTTON, diff --git a/src_nbgl/ui_sign_712.c b/src_nbgl/ui_sign_712.c index c612fcf..b4707f8 100644 --- a/src_nbgl/ui_sign_712.c +++ b/src_nbgl/ui_sign_712.c @@ -26,16 +26,12 @@ static bool display_review_page(uint8_t page, nbgl_pageContent_t *content) { switch (page) { case 0: // limit the value to one page - nbgl_getTextMaxLenInNbLines(BAGL_FONT_INTER_MEDIUM_32px, + nbgl_getTextMaxLenInNbLines(LARGE_MEDIUM_FONT, strings.tmp.tmp, SCREEN_WIDTH - (2 * BORDER_MARGIN), NB_MAX_LINES_IN_REVIEW, -#if (API_LEVEL == 0 || API_LEVEL >= 14) &len, false); -#else - &len); -#endif strings.tmp.tmp[len] = '\0'; pair.item = strings.tmp.tmp2; diff --git a/src_nbgl/ui_sign_message.c b/src_nbgl/ui_sign_message.c index a85d98b..50ec141 100644 --- a/src_nbgl/ui_sign_message.c +++ b/src_nbgl/ui_sign_message.c @@ -43,7 +43,7 @@ static bool display_message(nbgl_pageContent_t *content) { strncpy(g_stax_shared_buffer + eip191MessageIdx, strings.tmp.tmp + stringsTmpTmpIdx, SHARED_BUFFER_SIZE - eip191MessageIdx); - reached = nbgl_getTextMaxLenInNbLines(BAGL_FONT_INTER_MEDIUM_32px, + reached = nbgl_getTextMaxLenInNbLines(LARGE_MEDIUM_FONT, (char *) g_stax_shared_buffer, SCREEN_WIDTH - (2 * BORDER_MARGIN), NB_MAX_LINES_IN_REVIEW, @@ -91,7 +91,7 @@ static bool display_sign(nbgl_pageContent_t *content) { bool ret = false; if (g_position != UI_SIGNING_POSITION_SIGN) { - content->type = INFO_LONG_PRESS, content->infoLongPress.icon = &C_Message_64px; + content->type = INFO_LONG_PRESS, content->infoLongPress.icon = &C_Review_64px; content->infoLongPress.text = TEXT_SIGN_EIP191; content->infoLongPress.longPressText = SIGN_BUTTON; g_position = UI_SIGNING_POSITION_SIGN; diff --git a/src_nbgl/ui_warning_contract_data.c b/src_nbgl/ui_warning_contract_data.c index 2619dce..6a0e317 100644 --- a/src_nbgl/ui_warning_contract_data.c +++ b/src_nbgl/ui_warning_contract_data.c @@ -12,7 +12,7 @@ static void ui_warning_contract_data_choice(bool confirm) { } void ui_warning_contract_data(void) { - nbgl_useCaseChoice(&C_warning64px, + nbgl_useCaseChoice(&C_Warning_64px, "This message cannot\nbe clear-signed", "Enable blind-signing in\nthe settings to sign\nthis transaction.", "Exit", diff --git a/tools/gen_networks.py b/tools/gen_networks.py index 7c91b17..08b3da0 100755 --- a/tools/gen_networks.py +++ b/tools/gen_networks.py @@ -19,7 +19,7 @@ class Network: def get_network_glyph_name(net: Network) -> str: - return "stax_chain_%u_64px" % (net.chain_id) + return "chain_%u_64px" % (net.chain_id) def get_header() -> str: