File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -517,8 +517,21 @@ void starknet_get_pub_keys(starknet_query_t *query) {
517
517
if (STARKNET_QUERY_GET_USER_VERIFIED_PUBLIC_KEY_TAG == which_request ) {
518
518
char address [100 ] = "0x" ;
519
519
520
- // Calculate to-be account address
521
- starknet_derive_argent_address (& public_keys [0 ][0 ], & address [2 ]);
520
+ {
521
+ char raw_address [100 ] = {0 };
522
+ // Calculate to-be account address
523
+ starknet_derive_argent_address (& public_keys [0 ][0 ], raw_address );
524
+
525
+ size_t len = 64 - strnlen (raw_address , sizeof (raw_address ));
526
+ if (len < 0 ) {
527
+ len = 0 ;
528
+ }
529
+ uint8_t index = 2 ;
530
+ while (len -- ) {
531
+ sprintf (address + index ++ , "0" );
532
+ }
533
+ snprintf (address + index , sizeof (address ) - index , raw_address );
534
+ }
522
535
523
536
if (!core_scroll_page (ui_text_receive_on , address , starknet_send_error )) {
524
537
return ;
@@ -537,4 +550,4 @@ void starknet_get_pub_keys(starknet_query_t *query) {
537
550
}
538
551
539
552
delay_scr_init (ui_text_check_cysync_app , DELAY_TIME );
540
- }
553
+ }
You can’t perform that action at this time.
0 commit comments