@@ -200,13 +200,12 @@ parser_error_t schema_display_enum(parser_context_t *ctx, parser_tx_t *txObj) {
200200 if (variant .has_value && variant .value .tag == LINK_BY_INDEX ) {
201201 bool remove_variant = false;
202202 if (!variant .hide_tag && !enum_type .hide_tag ) {
203- CHECK_ERROR (append_item_title_new ((char * )variant .name .ptr , variant .name .len ));
203+ CHECK_ERROR (append_item_title ((char * )variant .name .ptr , variant .name .len ));
204204 remove_variant = true;
205205 }
206206 CHECK_ERROR (schema_display_generic_by_index (ctx , txObj , variant .value .data .by_index ));
207207 if (remove_variant ) {
208208 CHECK_ERROR (remove_last_item_title ());
209- CHECK_ERROR (remove_last_item_title_new ());
210209 }
211210 } else {
212211 parser_context_t ctx_bytes = {0 };
@@ -242,7 +241,7 @@ parser_error_t schema_display_struct(parser_context_t *ctx, parser_tx_t *txObj)
242241 sizeof (structured_show_as )));
243242 uint16_t len = strlen (structured_show_as );
244243 if (len > 0 ) {
245- CHECK_ERROR (append_item_title_new (structured_show_as , len ));
244+ CHECK_ERROR (append_item_title (structured_show_as , len ));
246245 try_push = true;
247246 }
248247 } else {
@@ -264,31 +263,28 @@ parser_error_t schema_display_struct(parser_context_t *ctx, parser_tx_t *txObj)
264263
265264 if (try_push ) {
266265 if (!is_data_context_empty ()) {
267- CHECK_ERROR (push_item_new (txObj ));
268- CHECK_ERROR (remove_last_item_title_new ());
266+ CHECK_ERROR (push_item (txObj ));
267+ CHECK_ERROR (remove_last_item_title ());
269268 }
270269 } else {
271270 // TODO: check if this is correct
272271 }
273272 }
274273 } else {
275274 for (uint32_t i = 0 ; i < struct_type .fields_qty ; i ++ ) {
276- if (i == 2 ) {
277- print_string ("schema_display_struct IMPLEMENT ME 2" );
278- }
279275 MEMZERO (& named_field , sizeof (named_field_t ));
280276 CHECK_ERROR (read_named_field (& struct_type .named_fields , & named_field ));
281277 bool remove_variant = false;
282278 if ((!named_field .silent && !is_link_skip (& named_field .value ) && !named_field .is_expert ) || ui_expert_mode ) {
283- CHECK_ERROR (append_item_title_new ((char * )named_field .display_name .ptr , named_field .display_name .len ));
279+ CHECK_ERROR (append_item_title ((char * )named_field .display_name .ptr , named_field .display_name .len ));
284280 remove_variant = true;
285281 }
286282 CHECK_ERROR (schema_display_generic_by_index (ctx , txObj , named_field .value .data .by_index ));
287283 if (remove_variant ) {
288284 if (!is_data_context_empty ()) {
289- CHECK_ERROR (push_item_new (txObj ));
285+ CHECK_ERROR (push_item (txObj ));
290286 }
291- CHECK_ERROR (remove_last_item_title_new ());
287+ CHECK_ERROR (remove_last_item_title ());
292288 }
293289 }
294290 }
@@ -340,10 +336,10 @@ parser_error_t schema_display_tuple(parser_context_t *ctx, parser_tx_t *txObj) {
340336 if (!unnamed_field .is_expert || ui_expert_mode ) {
341337 char index_str [12 ] = {0 };
342338 snprintf (index_str , sizeof (index_str ), "%u" , i );
343- CHECK_ERROR (append_item_title_new (index_str , strlen (index_str )));
339+ CHECK_ERROR (append_item_title (index_str , strlen (index_str )));
344340 if (!is_data_context_empty ()) {
345- CHECK_ERROR (push_item_new (txObj ));
346- CHECK_ERROR (remove_last_item_title_new ());
341+ CHECK_ERROR (push_item (txObj ));
342+ CHECK_ERROR (remove_last_item_title ());
347343 }
348344 }
349345 }
@@ -400,22 +396,22 @@ parser_error_t schema_display_array(parser_context_t *ctx, parser_tx_t *txObj) {
400396 for (uint32_t i = 0 ; i < array_type .len ; i ++ ) {
401397 char index_str [12 ];
402398 snprintf (index_str , sizeof (index_str ), "%d" , i );
403- CHECK_ERROR (append_item_title_new (index_str , strlen (index_str )));
399+ CHECK_ERROR (append_item_title (index_str , strlen (index_str )));
404400 switch (array_type .value .tag ) {
405401 case LINK_BY_INDEX :
406402 CHECK_ERROR (schema_display_generic_by_index (ctx , txObj , array_type .value .data .by_index ));
407403 if (!is_data_context_empty ()) {
408- CHECK_ERROR (push_item_new (txObj ));
409- CHECK_ERROR (remove_last_item_title_new ());
404+ CHECK_ERROR (push_item (txObj ));
405+ CHECK_ERROR (remove_last_item_title ());
410406 }
411407 break ;
412408 case LINK_IMMEDIATE : {
413409 CHECK_ERROR (schema_display_primitive (ctx , txObj , & array_type .value .data .immediate ));
414410 if (!is_data_context_empty ()) {
415- CHECK_ERROR (push_item_new (txObj ));
416- CHECK_ERROR (remove_last_item_title_new ());
411+ CHECK_ERROR (push_item (txObj ));
412+ CHECK_ERROR (remove_last_item_title ());
417413 if (i == array_type .len - 1 ) {
418- CHECK_ERROR (remove_last_item_title_new ());
414+ CHECK_ERROR (remove_last_item_title ());
419415 }
420416 }
421417 break ;
@@ -450,13 +446,13 @@ parser_error_t schema_display_vec(parser_context_t *ctx, parser_tx_t *txObj) {
450446 case LINK_IMMEDIATE : {
451447 char index_str [12 ];
452448 snprintf (index_str , sizeof (index_str ), "%d" , i );
453- CHECK_ERROR (append_item_title_new (index_str , strlen (index_str )));
449+ CHECK_ERROR (append_item_title (index_str , strlen (index_str )));
454450 CHECK_ERROR (schema_display_primitive (ctx , txObj , & vec_type .value .data .immediate ));
455451 if (!is_data_context_empty ()) {
456- CHECK_ERROR (push_item_new (txObj ));
457- CHECK_ERROR (remove_last_item_title_new ());
452+ CHECK_ERROR (push_item (txObj ));
453+ CHECK_ERROR (remove_last_item_title ());
458454 if (i == vec_len - 1 ) {
459- CHECK_ERROR (remove_last_item_title_new ());
455+ CHECK_ERROR (remove_last_item_title ());
460456 }
461457 }
462458 break ;
@@ -521,7 +517,6 @@ parser_error_t schema_parser_transaction(parser_context_t *ctx, parser_tx_t *txO
521517 ui_expert_mode = app_mode_expert ();
522518
523519 init_item_title_buffer (NULL );
524- init_item_title_buffer_new (NULL );
525520 set_enable_push_item (true);
526521
527522 txObj -> unsigned_transaction_raw .buffer .ptr = ctx -> buffer .ptr + ctx -> offset ;
0 commit comments