Adapt tree to take into account Flex

This commit is contained in:
Charles-Edouard de la Vergne
2024-04-09 14:05:13 +02:00
parent 5e661fd6d0
commit bfff5f1083
61 changed files with 15 additions and 18 deletions

View File

@@ -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

BIN
icons/flex_app_chain_1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 408 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 328 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 B

BIN
icons/flex_app_chain_19.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

BIN
icons/flex_app_chain_2.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

BIN
icons/flex_app_chain_24.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

BIN
icons/flex_app_chain_30.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

BIN
icons/flex_app_chain_31.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 386 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 436 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

BIN
icons/flex_app_chain_50.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

BIN
icons/flex_app_chain_51.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 493 B

BIN
icons/flex_app_chain_56.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 694 B

BIN
icons/flex_app_chain_60.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 B

BIN
icons/flex_app_chain_61.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 506 B

BIN
icons/flex_app_chain_64.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

BIN
icons/flex_app_chain_66.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 521 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

BIN
icons/flex_app_chain_76.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 669 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 404 B

BIN
icons/flex_app_chain_78.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 470 B

BIN
icons/flex_app_chain_8.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

BIN
icons/flex_app_chain_82.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

BIN
icons/flex_app_chain_88.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

BIN
icons/flex_app_chain_99.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

View File

@@ -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"

View File

@@ -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 "

View File

@@ -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,

View File

@@ -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;

View File

@@ -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;

View File

@@ -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",

View File

@@ -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: