From 4234dad78e35a145d2a2ee8509cfaa643127b3a8 Mon Sep 17 00:00:00 2001 From: Ajinkya Rajandekar <145996984+ajinkyaraj-23@users.noreply.github.com> Date: Tue, 16 Jul 2024 15:41:14 +0100 Subject: [PATCH] update tests to reflect the changes in blindsign workflow --- app/src/apdu_sign.c | 1 - app/src/ui_stream.h | 5 +++++ app/src/ui_stream_nbgl.c | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/apdu_sign.c b/app/src/apdu_sign.c index 6c5842856..0f5dbfbc7 100644 --- a/app/src/apdu_sign.c +++ b/app/src/apdu_sign.c @@ -592,7 +592,6 @@ handle_data_apdu_clear(command_t *cmd) #ifdef HAVE_NBGL static nbgl_layoutTagValueList_t useCaseTagValueList; -static nbgl_pageInfoLongPress_t infoLongPress; void reject_blindsign_cb(void) diff --git a/app/src/ui_stream.h b/app/src/ui_stream.h index 24acd3a2c..dc238db50 100644 --- a/app/src/ui_stream.h +++ b/app/src/ui_stream.h @@ -272,6 +272,11 @@ void tz_ui_stream_start(void); tz_ui_cb_type_t tz_ui_stream_get_cb_type(void); #ifdef HAVE_NBGL +/** + * @brief Send Reject code. + * + */ +void tz_reject(void); /** * @brief Reject confirmation screen. * diff --git a/app/src/ui_stream_nbgl.c b/app/src/ui_stream_nbgl.c index 882780ba1..700874cb1 100644 --- a/app/src/ui_stream_nbgl.c +++ b/app/src/ui_stream_nbgl.c @@ -104,11 +104,11 @@ static void blindsign_splash(bool confirm) { if (confirm) { tz_reject_ui(); } else { - const char *blindsign_msg = + const char blindsign_msg[] = "Your Ledger cannot decode this transaction. If you sign it, you could be authorizing " "malicious actions that can drain your wallet.\n"; - const char *learn_more_msg = '\n Learn More: tinyurl.com/ledger-Tezos'; - char total_blindsign_msg[150]= {'\0'}; + const char learn_more_msg[] = "\n Learn More: tinyurl.com/ledger-Tezos"; + char total_blindsign_msg[200]= {'\0'}; memcpy(total_blindsign_msg, blindsign_msg, sizeof(blindsign_msg)); memcpy(total_blindsign_msg + sizeof(blindsign_msg), global.error_code, sizeof(global.error_code) ); memcpy(total_blindsign_msg + sizeof(blindsign_msg) + sizeof(global.error_code), learn_more_msg, sizeof(learn_more_msg));