1616
1717#include "bolos_target.h"
1818
19- #if defined(TARGET_STAX ) || defined(TARGET_FLEX )
19+ #if defined(TARGET_STAX ) || defined(TARGET_FLEX ) || defined( TARGET_APEX_P )
2020
2121#include "actions.h"
2222#include "app_mode.h"
@@ -40,6 +40,18 @@ zxerr_t account_enabled();
4040#define VERIFY_TITLE_LABEL_GENERIC "Verify operation"
4141#define INFO_LIST_SIZE 4
4242#define SETTING_CONTENTS_NB 1
43+
44+ // Define icon variables based on target platform
45+ #if defined(TARGET_STAX ) || defined(TARGET_FLEX )
46+ #define C_IMPORTANT_CIRCLE_ICON C_Important_Circle_64px
47+ #define C_WARNING_ICON C_Warning_64px
48+ #define C_REVIEW_ICON C_Review_64px
49+ #elif defined(TARGET_APEX_P )
50+ #define C_IMPORTANT_CIRCLE_ICON C_Important_Circle_24px
51+ #define C_WARNING_ICON C_Warning_24px
52+ #define C_REVIEW_ICON C_Review_48px
53+ #endif
54+
4355static const char HOME_TEXT [] =
4456 "This application enables\nsigning transactions on the\n" MENU_MAIN_APP_LINE1 " network" ;
4557
@@ -83,7 +95,7 @@ static void h_approve_internal(void) { h_approve(review_type); }
8395
8496#ifdef TARGET_STAX
8597#define MAX_INFO_LIST_ITEM_PER_PAGE 3
86- #else // TARGET_FLEX
98+ #else // TARGET_FLEX || TARGET_APEX_P
8799#define MAX_INFO_LIST_ITEM_PER_PAGE 2
88100#endif
89101
@@ -175,18 +187,17 @@ void view_custom_error_show(const char *upper, const char *lower) {
175187 MEMZERO (viewdata .value , MAX_CHARS_PER_VALUE1_LINE );
176188 snprintf (viewdata .key , MAX_CHARS_PER_KEY_LINE , "%s" , upper );
177189 snprintf (viewdata .value , MAX_CHARS_PER_VALUE1_LINE , "%s" , lower );
178-
179- nbgl_useCaseChoice (& C_Important_Circle_64px , viewdata .key , viewdata .value , "Ok" , "" , confirm_error );
190+ nbgl_useCaseChoice (& C_IMPORTANT_CIRCLE_ICON , viewdata .key , viewdata .value , "Ok" , "" , confirm_error );
180191}
181192
182193void view_blindsign_error_show () {
183- nbgl_useCaseChoice (& C_Warning_64px , "This transaction cannot\nbe clear-signed" ,
194+ nbgl_useCaseChoice (& C_WARNING_ICON , "This transaction cannot\nbe clear-signed" ,
184195 "Enable blind signing in the\nsettings to sign this\ntransaction." , "Go to settings" ,
185196 "Reject Transaction" , goto_settings );
186197}
187198
188199void view_error_show_impl () {
189- nbgl_useCaseChoice (& C_Important_Circle_64px , viewdata .key , viewdata .value , "Ok" , NULL , confirm_setting );
200+ nbgl_useCaseChoice (& C_IMPORTANT_CIRCLE_ICON , viewdata .key , viewdata .value , "Ok" , NULL , confirm_setting );
190201}
191202
192203void view_settings_show_impl () {
@@ -402,7 +413,7 @@ static void review_configuration() {
402413 view_error_show ();
403414 }
404415
405- nbgl_useCaseChoice (& C_Important_Circle_64px , viewdata .key , viewdata .value , "Accept" , "Reject" , confirm_setting );
416+ nbgl_useCaseChoice (& C_IMPORTANT_CIRCLE_ICON , viewdata .key , viewdata .value , "Accept" , "Reject" , confirm_setting );
406417}
407418
408419static void config_useCaseAddressReview () {
@@ -494,13 +505,14 @@ static void config_useCaseMessageReview() {
494505 pairList .callback = update_item_callback ;
495506 pairList .startIndex = 0 ;
496507 if (app_mode_blindsign_required ()) {
497- nbgl_useCaseReviewBlindSigning (TYPE_MESSAGE , & pairList , & C_Review_64px ,
508+ nbgl_useCaseReviewBlindSigning (TYPE_MESSAGE , & pairList , & C_REVIEW_ICON ,
498509 (intro_message == NULL ? "Review Message" : intro_message ), NULL ,
499510 "Accept risk and sign message ?" , NULL , reviewMessageChoice );
500511 } else {
501- nbgl_useCaseReview (
502- TYPE_MESSAGE , & pairList , & C_Review_64px , (intro_message == NULL ? "Review Message" : intro_message ), NULL ,
503- (approval_label_buf [0 ] != '\0' ? approval_label_buf : APPROVE_LABEL_NBGL_MSG ), reviewMessageChoice );
512+ nbgl_useCaseReview (TYPE_MESSAGE , & pairList , & C_REVIEW_ICON ,
513+ (intro_message == NULL ? "Review Message" : intro_message ), intro_submessage ,
514+ (approval_label_buf [0 ] != '\0' ? approval_label_buf : APPROVE_LABEL_NBGL ),
515+ reviewMessageChoice );
504516 }
505517}
506518
0 commit comments