Adapt tree to take into account Flex
13
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
|
||||
|
||||
|
||||
|
||||
BIN
icons/flex_app_chain_1.gif
Normal file
|
After Width: | Height: | Size: 375 B |
BIN
icons/flex_app_chain_1030.gif
Normal file
|
After Width: | Height: | Size: 456 B |
BIN
icons/flex_app_chain_108.gif
Normal file
|
After Width: | Height: | Size: 396 B |
BIN
icons/flex_app_chain_1284.gif
Normal file
|
After Width: | Height: | Size: 442 B |
BIN
icons/flex_app_chain_1285.gif
Normal file
|
After Width: | Height: | Size: 494 B |
BIN
icons/flex_app_chain_1313114.gif
Normal file
|
After Width: | Height: | Size: 408 B |
BIN
icons/flex_app_chain_137.gif
Normal file
|
After Width: | Height: | Size: 413 B |
BIN
icons/flex_app_chain_1620.gif
Normal file
|
After Width: | Height: | Size: 328 B |
BIN
icons/flex_app_chain_1818.gif
Normal file
|
After Width: | Height: | Size: 525 B |
BIN
icons/flex_app_chain_19.gif
Normal file
|
After Width: | Height: | Size: 374 B |
BIN
icons/flex_app_chain_1987.gif
Normal file
|
After Width: | Height: | Size: 406 B |
BIN
icons/flex_app_chain_199.gif
Normal file
|
After Width: | Height: | Size: 610 B |
BIN
icons/flex_app_chain_2.gif
Normal file
|
After Width: | Height: | Size: 541 B |
BIN
icons/flex_app_chain_200625.gif
Normal file
|
After Width: | Height: | Size: 599 B |
BIN
icons/flex_app_chain_20531811.gif
Normal file
|
After Width: | Height: | Size: 536 B |
BIN
icons/flex_app_chain_20531812.gif
Normal file
|
After Width: | Height: | Size: 536 B |
BIN
icons/flex_app_chain_237.gif
Normal file
|
After Width: | Height: | Size: 518 B |
BIN
icons/flex_app_chain_24.gif
Normal file
|
After Width: | Height: | Size: 544 B |
BIN
icons/flex_app_chain_24484.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
icons/flex_app_chain_246.gif
Normal file
|
After Width: | Height: | Size: 452 B |
BIN
icons/flex_app_chain_246529.gif
Normal file
|
After Width: | Height: | Size: 669 B |
BIN
icons/flex_app_chain_246785.gif
Normal file
|
After Width: | Height: | Size: 669 B |
BIN
icons/flex_app_chain_248.gif
Normal file
|
After Width: | Height: | Size: 544 B |
BIN
icons/flex_app_chain_269.gif
Normal file
|
After Width: | Height: | Size: 550 B |
BIN
icons/flex_app_chain_2894.gif
Normal file
|
After Width: | Height: | Size: 516 B |
BIN
icons/flex_app_chain_30.gif
Normal file
|
After Width: | Height: | Size: 444 B |
BIN
icons/flex_app_chain_31.gif
Normal file
|
After Width: | Height: | Size: 444 B |
BIN
icons/flex_app_chain_31102.gif
Normal file
|
After Width: | Height: | Size: 386 B |
BIN
icons/flex_app_chain_3125659152.gif
Normal file
|
After Width: | Height: | Size: 436 B |
BIN
icons/flex_app_chain_336.gif
Normal file
|
After Width: | Height: | Size: 539 B |
BIN
icons/flex_app_chain_50.gif
Normal file
|
After Width: | Height: | Size: 493 B |
BIN
icons/flex_app_chain_51.gif
Normal file
|
After Width: | Height: | Size: 493 B |
BIN
icons/flex_app_chain_56.gif
Normal file
|
After Width: | Height: | Size: 539 B |
BIN
icons/flex_app_chain_592.gif
Normal file
|
After Width: | Height: | Size: 694 B |
BIN
icons/flex_app_chain_60.gif
Normal file
|
After Width: | Height: | Size: 494 B |
BIN
icons/flex_app_chain_61.gif
Normal file
|
After Width: | Height: | Size: 430 B |
BIN
icons/flex_app_chain_62621.gif
Normal file
|
After Width: | Height: | Size: 506 B |
BIN
icons/flex_app_chain_64.gif
Normal file
|
After Width: | Height: | Size: 478 B |
BIN
icons/flex_app_chain_66.gif
Normal file
|
After Width: | Height: | Size: 239 B |
BIN
icons/flex_app_chain_7341.gif
Normal file
|
After Width: | Height: | Size: 521 B |
BIN
icons/flex_app_chain_73799.gif
Normal file
|
After Width: | Height: | Size: 464 B |
BIN
icons/flex_app_chain_76.gif
Normal file
|
After Width: | Height: | Size: 669 B |
BIN
icons/flex_app_chain_7762959.gif
Normal file
|
After Width: | Height: | Size: 404 B |
BIN
icons/flex_app_chain_78.gif
Normal file
|
After Width: | Height: | Size: 470 B |
BIN
icons/flex_app_chain_8.gif
Normal file
|
After Width: | Height: | Size: 389 B |
BIN
icons/flex_app_chain_82.gif
Normal file
|
After Width: | Height: | Size: 500 B |
BIN
icons/flex_app_chain_820.gif
Normal file
|
After Width: | Height: | Size: 401 B |
BIN
icons/flex_app_chain_846000.gif
Normal file
|
After Width: | Height: | Size: 406 B |
BIN
icons/flex_app_chain_88.gif
Normal file
|
After Width: | Height: | Size: 598 B |
BIN
icons/flex_app_chain_888.gif
Normal file
|
After Width: | Height: | Size: 501 B |
BIN
icons/flex_app_chain_99.gif
Normal file
|
After Width: | Height: | Size: 215 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 116 B |
@@ -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"
|
||||
|
||||
@@ -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 "
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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:
|
||||
|
||||