Skip to content

Commit

Permalink
fixup! feat(core): improve repeated backup
Browse files Browse the repository at this point in the history
  • Loading branch information
matejcik committed Jun 5, 2024
1 parent ff7744e commit 60363c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions core/src/apps/management/backup_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

async def perform_backup(
is_repeated_backup: bool,
should_confirm_backup: bool,
group_threshold: int | None = None,
groups: Sequence[tuple[int, int]] = (),
) -> None:
Expand All @@ -25,7 +24,7 @@ async def perform_backup(
from .reset_device import backup_seed, backup_slip39_custom, layout

# Ask the user to confirm backup. The user can still escape here.
if should_confirm_backup:
if is_repeated_backup:
await confirm_action(
"confirm_repeated_backup",
TR.recovery__title_unlock_repeated_backup,
Expand Down Expand Up @@ -104,11 +103,6 @@ async def backup_device(msg: BackupDevice) -> Success:
elif len(groups) > 0:
raise wire.DataError("group_threshold is missing")

await perform_backup(
is_repeated_backup,
is_repeated_backup, # should_confirm_backup - only if repeated
group_threshold,
groups,
)
await perform_backup(is_repeated_backup, group_threshold, groups)

return Success(message="Seed successfully backed up")
2 changes: 1 addition & 1 deletion core/src/apps/management/recovery_device/homescreen.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ async def _continue_repeated_backup() -> None:
)

try:
await perform_backup(is_repeated_backup=True, should_confirm_backup=True)
await perform_backup(is_repeated_backup=True)
finally:
backup.deactivate_repeated_backup()

Expand Down

0 comments on commit 60363c9

Please sign in to comment.