3636#include "menu.h"
3737#include "utils.h"
3838
39- static nbgl_contentTagValue_t pairs [1 ];
4039static nbgl_contentTagValueList_t pairList ;
4140
4241// called when long press button on 3rd page is long-touched or when reject footer is touched
@@ -65,10 +64,14 @@ int ui_display_transaction_bs_choice(bool is_blind_signed) {
6564 PRINTF ("Hash: %.*H\n" , sizeof (G_context .tx_info .m_hash ), G_context .tx_info .m_hash );
6665 // Setup data to display
6766 size_t hex_hash_length = 2 * G_context .tx_info .m_hash_len + 1 ;
68- pairs [0 ].value = (char * ) app_mem_alloc (hex_hash_length );
69- LEDGER_ASSERT (pairs [0 ].value != NULL , "Memory full" );
70- pairs [0 ].item = "Transaction hash" ;
71- SNPRINTF ((char * ) pairs [0 ].value ,
67+ G_context .tx_info .pairs =
68+ (nbgl_contentTagValue_t * ) app_mem_alloc (sizeof (nbgl_contentTagValue_t ));
69+ LEDGER_ASSERT (G_context .tx_info .pairs != NULL , "Memory full" );
70+ memset (G_context .tx_info .pairs , 0 , sizeof (nbgl_contentTagValue_t ));
71+ G_context .tx_info .pairs [0 ].item = "Transaction hash" ;
72+ G_context .tx_info .pairs [0 ].value = (char * ) app_mem_alloc (hex_hash_length );
73+ LEDGER_ASSERT (G_context .tx_info .pairs [0 ].value != NULL , "Memory full" );
74+ SNPRINTF ((char * ) G_context .tx_info .pairs [0 ].value ,
7275 hex_hash_length ,
7376 "%.*H" ,
7477 G_context .tx_info .m_hash_len ,
@@ -77,7 +80,7 @@ int ui_display_transaction_bs_choice(bool is_blind_signed) {
7780 // Setup list
7881 pairList .nbMaxLinesForValue = 0 ;
7982 pairList .nbPairs = 1 ;
80- pairList .pairs = pairs ;
83+ pairList .pairs = G_context . tx_info . pairs ;
8184
8285 // Start blind-signing review flow
8386 nbgl_useCaseReviewBlindSigning (TYPE_TRANSACTION ,
0 commit comments