fixup! feat(core): implement repeated backup

Ioan Bizău 4 weeks ago
parent 832d9e60c7
commit fadb54c8e1

@ -193,7 +193,10 @@ def recover(
if word_count not in (12, 18, 24):
raise ValueError("Invalid word count. Use 12/18/24")
if client.features.initialized and recovery_kind == messages.RecoveryKind.NormalRecovery:
if (
client.features.initialized
and recovery_kind == messages.RecoveryKind.NormalRecovery
):
raise RuntimeError(
"Device already initialized. Call device.wipe() and try again."
)

@ -61,7 +61,6 @@ def select_number_of_words(
) -> None:
if wait:
debug.wait_layout()
TR.assert_equals(debug.read_layout().text_content(), "recovery__num_of_words")
if debug.model in (models.T2T1, models.T3T1):
# click the number
word_option_offset = 6
@ -72,6 +71,7 @@ def select_number_of_words(
coords = buttons.grid34(index % 3, index // 3)
layout = debug.click(coords, wait=True)
elif debug.model in (models.T2B1,):
TR.assert_equals(debug.read_layout().text_content(), "recovery__num_of_words")
layout = debug.press_right(wait=True)
TR.assert_equals(layout.title(), "word_count__title")

Loading…
Cancel
Save