From 788f9fe115da97475d19c121b52c6494a476c359 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ioan=20Biz=C4=83u?= Date: Thu, 25 Apr 2024 09:34:56 +0200 Subject: [PATCH] fixup! chore(core): add an extra confirmation for non-1-of-1 Shamir backups --- core/src/apps/management/reset_device/__init__.py | 4 +++- tests/input_flows.py | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/core/src/apps/management/reset_device/__init__.py b/core/src/apps/management/reset_device/__init__.py index 212cc0de7..d4b04c5e8 100644 --- a/core/src/apps/management/reset_device/__init__.py +++ b/core/src/apps/management/reset_device/__init__.py @@ -170,7 +170,9 @@ async def _backup_slip39_custom( 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]), + 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: diff --git a/tests/input_flows.py b/tests/input_flows.py index 1ece12eec..29710910c 100644 --- a/tests/input_flows.py +++ b/tests/input_flows.py @@ -1390,6 +1390,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() @@ -1401,6 +1405,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() @@ -1412,6 +1420,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()