chore(core): add an extra confirmation for non-1-of-1 Shamir backups

mmilata/ui-t3t1-preview
Ioan Bizău 1 month ago committed by obrusvit
parent a8d018e797
commit 1ad97aab8b

@ -432,6 +432,7 @@ static void _librust_qstrs(void) {
MP_QSTR_reset__check_wallet_backup_title;
MP_QSTR_reset__continue_with_next_share;
MP_QSTR_reset__continue_with_share_template;
MP_QSTR_reset__create_x_of_y_shamir_backup_template;
MP_QSTR_reset__finished_verifying_group_template;
MP_QSTR_reset__finished_verifying_shares;
MP_QSTR_reset__finished_verifying_wallet_backup;

@ -577,6 +577,7 @@ class TR:
reset__check_wallet_backup_title: str = "Check wallet backup"
reset__continue_with_next_share: str = "Continue with the next share."
reset__continue_with_share_template: str = "Continue with share #{0}."
reset__create_x_of_y_shamir_backup_template: str = "Do you want to create a {0} of {1} Shamir backup?"
reset__finished_verifying_group_template: str = "You have finished verifying your recovery shares for group {0}."
reset__finished_verifying_shares: str = "You have finished verifying your recovery shares."
reset__finished_verifying_wallet_backup: str = "You have finished verifying your wallet backup."

@ -167,7 +167,14 @@ async def backup_slip39_custom(
# for a single 1-of-1 group, we use the same layouts as for BIP39
await layout.show_and_confirm_mnemonic(mnemonics[0][0])
else:
# TODO: a confirmation screen will be shown: "do you want to create a -of- Shamir backup?"
await confirm_action(
"warning_shamir_backup",
TR.reset__title_shamir_backup,
description=TR.reset__create_x_of_y_shamir_backup_template.format(
groups[0][0], groups[0][1]
),
verb=TR.buttons__continue,
)
if len(groups) == 1:
await layout.slip39_basic_show_and_confirm_shares(mnemonics[0])
else:

@ -579,6 +579,7 @@
"reset__check_backup_instructions": "Let's do a quick check of your backup.",
"reset__continue_with_next_share": "Continue with the next share.",
"reset__continue_with_share_template": "Continue with share #{0}.",
"reset__create_x_of_y_shamir_backup_template": "Do you want to create a {0} of {1} Shamir backup?",
"reset__finished_verifying_group_template": "You have finished verifying your recovery shares for group {0}.",
"reset__finished_verifying_wallet_backup": "You have finished verifying your wallet backup.",
"reset__finished_verifying_shares": "You have finished verifying your recovery shares.",

@ -1474,6 +1474,10 @@ class InputFlowSlip39CustomBackup(InputFlowBase):
self.share_count = share_count
def input_flow_tt(self) -> BRGeneratorType:
if self.share_count > 1:
yield # Checklist
self.debug.press_yes()
yield # Confirm show seeds
self.debug.press_yes()
@ -1485,6 +1489,10 @@ class InputFlowSlip39CustomBackup(InputFlowBase):
self.debug.press_yes()
def input_flow_tr(self) -> BRGeneratorType:
if self.share_count > 1:
yield # Checklist
self.debug.press_yes()
yield # Confirm show seeds
self.debug.press_yes()
@ -1496,6 +1504,10 @@ class InputFlowSlip39CustomBackup(InputFlowBase):
self.debug.press_yes()
def input_flow_t3t1(self) -> BRGeneratorType:
if self.share_count > 1:
yield # Checklist
self.debug.press_yes()
yield # Confirm show seeds
self.debug.press_yes()

Loading…
Cancel
Save