From 1413547d3ec13e13a77344e689be486869305aa4 Mon Sep 17 00:00:00 2001 From: Alexandre Paillier Date: Fri, 5 May 2023 14:57:58 +0200 Subject: [PATCH] Removed large global buffer from NBGL transaction signing UI code --- src_nbgl/ui_approve_tx.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src_nbgl/ui_approve_tx.c b/src_nbgl/ui_approve_tx.c index b3aec12..377166c 100644 --- a/src_nbgl/ui_approve_tx.c +++ b/src_nbgl/ui_approve_tx.c @@ -20,7 +20,6 @@ static nbgl_layoutTagValue_t pair; // these buffers are used as circular static char title_buffer[MAX_PLUGIN_ITEMS_PER_SCREEN][TAG_MAX_LEN]; static char msg_buffer[MAX_PLUGIN_ITEMS_PER_SCREEN][VALUE_MAX_LEN]; -static char transaction_type[100]; static nbgl_layoutTagValueList_t useCaseTagValueList; static nbgl_pageInfoLongPress_t infoLongPress; @@ -212,7 +211,7 @@ static void reviewContinueCommon(void) { useCaseTagValueList.smallCaseForValue = false; useCaseTagValueList.wrapping = false; infoLongPress.icon = get_app_icon(true); - infoLongPress.text = tx_approval_context.fromPlugin ? transaction_type : "Review transaction"; + infoLongPress.text = tx_approval_context.fromPlugin ? staxSharedBuffer : "Review transaction"; infoLongPress.longPressText = "Hold to sign"; nbgl_useCaseStaticReview(&useCaseTagValueList, &infoLongPress, @@ -223,12 +222,12 @@ static void reviewContinueCommon(void) { static void buildFirstPage(void) { if (tx_approval_context.fromPlugin) { plugin_ui_get_id(); - SPRINTF(transaction_type, + SPRINTF(staxSharedBuffer, "Review %s\ntransaction:\n%s", strings.common.fullAddress, strings.common.fullAmount); nbgl_useCaseReviewStart(get_app_icon(true), - transaction_type, + staxSharedBuffer, NULL, "Reject transaction", reviewContinue,