From bcb3385b2ebf03b127a4a12b88fadc1d9ed687aa Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Fri, 3 Nov 2023 18:22:39 +0530 Subject: [PATCH] fix(ui): Delete flow triggered in creation if card not paired --- src/constant_texts.c | 5 ++--- src/wallet/create_new_wallet_flow.c | 4 ++-- src/wallet/restore_seed_phrase_flow.c | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/constant_texts.c b/src/constant_texts.c index dd99b25d..16455217 100644 --- a/src/constant_texts.c +++ b/src/constant_texts.c @@ -112,7 +112,7 @@ const char *ui_text_options_logging_export[] = { const char *ui_text_pair_card_confirm = "Do you want to proceed with card pairing?"; const char *ui_text_card_pairing_success = "All cards are paired"; -const char *ui_text_card_pairing_warning = "Pair all cards from settings"; +const char *ui_text_card_pairing_warning = "Pair all cards from Settings"; #if DEV_BUILD const char *ui_text_options_buzzer_adjust[] = { @@ -488,8 +488,7 @@ const char *ui_text_wrong_btc_transaction = "Wrong transaction formatting"; const char *ui_text_btc_change_address_mismatch = "Change address mismatch"; const char *ui_text_worng_eth_transaction = "Invalid transaction detected"; const char *ui_text_error_no_card_paired = "No cards paired with device"; -const char *ui_text_error_pair_all_cards = - "Pair all four cards from Settings menu"; +const char *ui_text_error_pair_all_cards = "Pair all four cards from Settings"; const char *ui_text_error_pair_atleast_2_cards = "Pair at least two cards from Settings"; const char *ui_text_continue_with_pairing = "Proceed with pairing?"; diff --git a/src/wallet/create_new_wallet_flow.c b/src/wallet/create_new_wallet_flow.c index 6d7902ec..fa05c0b8 100644 --- a/src/wallet/create_new_wallet_flow.c +++ b/src/wallet/create_new_wallet_flow.c @@ -420,13 +420,13 @@ Flash_Wallet *create_new_wallet_flow() { // Ensure that atleast 4 cards are paired if (get_keystore_used_count() < MAX_KEYSTORE_ENTRY) { mark_core_error_screen(ui_text_error_pair_all_cards, false); - return; + return NULL; } // Confirm that all 4 cards are needed if (!core_scroll_page( NULL, ui_text_need_all_x1cards_to_create_wallet, NULL)) { - return; + return NULL; } clear_wallet_data(); diff --git a/src/wallet/restore_seed_phrase_flow.c b/src/wallet/restore_seed_phrase_flow.c index 0348ffa8..5903c662 100644 --- a/src/wallet/restore_seed_phrase_flow.c +++ b/src/wallet/restore_seed_phrase_flow.c @@ -533,13 +533,13 @@ Flash_Wallet *restore_seed_phrase_flow() { // Ensure that atleast 4 cards are paired if (get_keystore_used_count() < MAX_KEYSTORE_ENTRY) { mark_core_error_screen(ui_text_error_pair_all_cards, false); - return; + return NULL; } // Confirm that all 4 cards are needed if (!core_scroll_page( NULL, ui_text_need_all_x1cards_to_create_wallet, NULL)) { - return; + return NULL; } clear_wallet_data();