@@ -30,9 +30,8 @@ bool ui_expert_mode = false;
3030
3131#define NONE_STRING "None"
3232
33- parser_error_t schema_display_integer (parser_context_t * ctx , parser_tx_t * txObj , primitive_integer_t * primitive ) {
33+ parser_error_t schema_display_integer (parser_context_t * ctx , primitive_integer_t * primitive ) {
3434 CHECK_INPUT (ctx );
35- CHECK_INPUT (txObj );
3635 CHECK_INPUT (primitive );
3736
3837 parser_context_t ctx_bytes = {0 };
@@ -109,9 +108,8 @@ parser_error_t schema_display_integer(parser_context_t *ctx, parser_tx_t *txObj,
109108 return parser_ok ;
110109}
111110
112- parser_error_t schema_display_byte_array (parser_context_t * ctx , parser_tx_t * txObj , primitive_byte_array_t * byte_array ) {
111+ parser_error_t schema_display_byte_array (parser_context_t * ctx , primitive_byte_array_t * byte_array ) {
113112 CHECK_INPUT (ctx );
114- CHECK_INPUT (txObj );
115113 CHECK_INPUT (byte_array );
116114
117115 parser_context_t ctx_bytes = {0 };
@@ -128,9 +126,8 @@ parser_error_t schema_display_byte_array(parser_context_t *ctx, parser_tx_t *txO
128126 return parser_ok ;
129127}
130128
131- parser_error_t schema_display_primitive (parser_context_t * ctx , parser_tx_t * txObj , primitive_t * primitive ) {
129+ parser_error_t schema_display_primitive (parser_context_t * ctx , primitive_t * primitive ) {
132130 CHECK_INPUT (ctx );
133- CHECK_INPUT (txObj );
134131
135132 uint16_t primitive_size = sizeof (primitive );
136133 print_u16 ("Primitive size: " , primitive_size );
@@ -141,12 +138,12 @@ parser_error_t schema_display_primitive(parser_context_t *ctx, parser_tx_t *txOb
141138 case PRIMITIVE_INTEGER :
142139 primitive_size = sizeof (primitive -> integer );
143140 print_u16 ("Primitive size integer_0: " , primitive_size );
144- CHECK_ERROR (schema_display_integer (ctx , txObj , & primitive -> integer ));
141+ CHECK_ERROR (schema_display_integer (ctx , & primitive -> integer ));
145142 break ;
146143 case PRIMITIVE_BYTE_ARRAY :
147144 primitive_size = sizeof (primitive -> byte_array );
148145 print_u16 ("Primitive size byte_array: " , primitive_size );
149- CHECK_ERROR (schema_display_byte_array (ctx , txObj , & primitive -> byte_array ));
146+ CHECK_ERROR (schema_display_byte_array (ctx , & primitive -> byte_array ));
150147 break ;
151148 case PRIMITIVE_BYTE_VEC :
152149 // TODO: Implement me
@@ -254,7 +251,7 @@ parser_error_t schema_display_struct(parser_context_t *ctx, parser_tx_t *txObj)
254251 CHECK_ERROR (schema_display_generic_by_index (ctx , txObj , named_field .value .data .by_index ));
255252 break ;
256253 case LINK_IMMEDIATE :
257- CHECK_ERROR (schema_display_primitive (ctx , txObj , & named_field .value .data .immediate ));
254+ CHECK_ERROR (schema_display_primitive (ctx , & named_field .value .data .immediate ));
258255 break ;
259256 default :
260257 print_string ("schema_display_struct IMPLEMENT ME 1" );
@@ -323,7 +320,7 @@ parser_error_t schema_display_tuple(parser_context_t *ctx, parser_tx_t *txObj) {
323320 CHECK_ERROR (schema_display_generic_by_index (ctx , txObj , unnamed_field .value .data .by_index ));
324321 break ;
325322 case LINK_IMMEDIATE :
326- CHECK_ERROR (schema_display_primitive (ctx , txObj , & unnamed_field .value .data .immediate ));
323+ CHECK_ERROR (schema_display_primitive (ctx , & unnamed_field .value .data .immediate ));
327324 break ;
328325 default :
329326 print_string ("Tuple field is not a link by index\n" );
@@ -375,7 +372,7 @@ parser_error_t schema_display_option(parser_context_t *ctx, parser_tx_t *txObj)
375372 CHECK_ERROR (schema_display_generic_by_index (ctx , txObj , option_type .value .data .by_index ));
376373 break ;
377374 case LINK_IMMEDIATE :
378- CHECK_ERROR (schema_display_primitive (ctx , txObj , & option_type .value .data .immediate ));
375+ CHECK_ERROR (schema_display_primitive (ctx , & option_type .value .data .immediate ));
379376 break ;
380377 default :
381378 print_string ("Option field is not a link by index\n" );
@@ -406,7 +403,7 @@ parser_error_t schema_display_array(parser_context_t *ctx, parser_tx_t *txObj) {
406403 }
407404 break ;
408405 case LINK_IMMEDIATE : {
409- CHECK_ERROR (schema_display_primitive (ctx , txObj , & array_type .value .data .immediate ));
406+ CHECK_ERROR (schema_display_primitive (ctx , & array_type .value .data .immediate ));
410407 if (!is_data_context_empty ()) {
411408 CHECK_ERROR (push_item (txObj ));
412409 CHECK_ERROR (remove_last_item_title ());
@@ -447,7 +444,7 @@ parser_error_t schema_display_vec(parser_context_t *ctx, parser_tx_t *txObj) {
447444 char index_str [12 ];
448445 snprintf (index_str , sizeof (index_str ), "%d" , i );
449446 CHECK_ERROR (append_item_title (index_str , strlen (index_str )));
450- CHECK_ERROR (schema_display_primitive (ctx , txObj , & vec_type .value .data .immediate ));
447+ CHECK_ERROR (schema_display_primitive (ctx , & vec_type .value .data .immediate ));
451448 if (!is_data_context_empty ()) {
452449 CHECK_ERROR (push_item (txObj ));
453450 CHECK_ERROR (remove_last_item_title ());
@@ -529,7 +526,5 @@ parser_error_t schema_parser_transaction(parser_context_t *ctx, parser_tx_t *txO
529526
530527 txObj -> unsigned_transaction_raw .buffer .len = ctx -> offset - offset_mem_txn ;
531528
532- // CHECK_ERROR(test_schema_create_device_items());
533-
534529 return parser_ok ;
535530}
0 commit comments