Skip to content

Commit

Permalink
fix(ui): Delete flow triggered in creation if card not paired
Browse files Browse the repository at this point in the history
  • Loading branch information
amanCypherock committed Nov 3, 2023
1 parent d06ddc6 commit bcb3385
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/constant_texts.c
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = {
Expand Down Expand Up @@ -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?";
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/create_new_wallet_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/wallet/restore_seed_phrase_flow.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit bcb3385

Please sign in to comment.