mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 05:58:09 +00:00
tests: fix input_flows
Reset/recovery tests after adding Wallet created screen and separate backup intro. Regen signatures.json after rebase. [no changelog]
This commit is contained in:
parent
fd59c2ce88
commit
e30de62adc
@ -1407,7 +1407,7 @@ extern "C" fn new_confirm_recovery(n_args: usize, args: *const Obj, kwargs: *mut
|
|||||||
paragraphs
|
paragraphs
|
||||||
.add(Paragraph::new(
|
.add(Paragraph::new(
|
||||||
&theme::TEXT_NORMAL,
|
&theme::TEXT_NORMAL,
|
||||||
TR::recovery__only_first_n_letters,
|
TR::recovery__enter_each_word,
|
||||||
))
|
))
|
||||||
.add(Paragraph::new(
|
.add(Paragraph::new(
|
||||||
&theme::TEXT_NORMAL,
|
&theme::TEXT_NORMAL,
|
||||||
|
@ -123,7 +123,7 @@ async def continue_recovery(
|
|||||||
|
|
||||||
if show_info:
|
if show_info:
|
||||||
# Show this just one-time
|
# Show this just one-time
|
||||||
description = TR.recovery__only_first_n_letters
|
description = TR.recovery__enter_each_word
|
||||||
else:
|
else:
|
||||||
description = subtext or ""
|
description = subtext or ""
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"current": {
|
"current": {
|
||||||
"merkle_root": "405ce2be8dcb492a1d4b25ec8aaeaa9914ff88594151beaceea52315172b11d0",
|
"merkle_root": "ba305d41fa4793fc71a2cd124cd9170ce93177f0a749ea0444c2f06cc3a65d2b",
|
||||||
"datetime": "2024-06-03T12:40:07.498873",
|
"datetime": "2024-06-05T14:49:38.622932",
|
||||||
"commit": "2ac4967ef190dac1fe238cc00878ff2d08e17bb5"
|
"commit": "7322ca7ddb4539885970f4546494369e1ff950f8"
|
||||||
},
|
},
|
||||||
"history": [
|
"history": [
|
||||||
{
|
{
|
||||||
|
@ -108,7 +108,10 @@ def select_number_of_words(
|
|||||||
if debug.model in (models.T2B1,):
|
if debug.model in (models.T2B1,):
|
||||||
TR.assert_in(layout.text_content(), "recovery__enter_backup")
|
TR.assert_in(layout.text_content(), "recovery__enter_backup")
|
||||||
else:
|
else:
|
||||||
TR.assert_in(layout.text_content(), "recovery__only_first_n_letters")
|
TR.assert_in_multiple(
|
||||||
|
layout.text_content(),
|
||||||
|
["recovery__only_first_n_letters", "recovery__enter_each_word"],
|
||||||
|
)
|
||||||
elif num_of_words in (20, 33):
|
elif num_of_words in (20, 33):
|
||||||
TR.assert_in_multiple(
|
TR.assert_in_multiple(
|
||||||
layout.text_content(),
|
layout.text_content(),
|
||||||
@ -116,12 +119,17 @@ def select_number_of_words(
|
|||||||
"recovery__enter_backup",
|
"recovery__enter_backup",
|
||||||
"recovery__enter_any_share",
|
"recovery__enter_any_share",
|
||||||
"recovery__only_first_n_letters",
|
"recovery__only_first_n_letters",
|
||||||
|
"recovery__enter_each_word",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
else: # BIP-39
|
else: # BIP-39
|
||||||
TR.assert_in_multiple(
|
TR.assert_in_multiple(
|
||||||
layout.text_content(),
|
layout.text_content(),
|
||||||
["recovery__enter_backup", "recovery__only_first_n_letters"],
|
[
|
||||||
|
"recovery__enter_backup",
|
||||||
|
"recovery__only_first_n_letters",
|
||||||
|
"recovery__enter_each_word",
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -163,6 +171,7 @@ def enter_shares(
|
|||||||
"recovery__enter_backup",
|
"recovery__enter_backup",
|
||||||
"recovery__enter_any_share",
|
"recovery__enter_any_share",
|
||||||
"recovery__only_first_n_letters",
|
"recovery__only_first_n_letters",
|
||||||
|
"recovery__enter_each_word",
|
||||||
text,
|
text,
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -247,7 +256,12 @@ def prepare_enter_seed(
|
|||||||
) -> None:
|
) -> None:
|
||||||
TR.assert_in_multiple(
|
TR.assert_in_multiple(
|
||||||
debug.read_layout().text_content(),
|
debug.read_layout().text_content(),
|
||||||
["recovery__enter_backup", "recovery__only_first_n_letters", layout_text],
|
[
|
||||||
|
"recovery__enter_backup",
|
||||||
|
"recovery__only_first_n_letters",
|
||||||
|
"recovery__enter_each_word",
|
||||||
|
layout_text,
|
||||||
|
],
|
||||||
)
|
)
|
||||||
if debug.model in (models.T2T1,):
|
if debug.model in (models.T2T1,):
|
||||||
debug.click(buttons.OK, wait=True)
|
debug.click(buttons.OK, wait=True)
|
||||||
|
@ -125,7 +125,7 @@ def confirm_words(debug: "DebugLink", words: list[str]) -> None:
|
|||||||
debug.swipe_up(wait=True)
|
debug.swipe_up(wait=True)
|
||||||
|
|
||||||
layout = debug.wait_layout()
|
layout = debug.wait_layout()
|
||||||
if debug.model in (models.T2T1, models.T3T1):
|
if debug.model in (models.T2T1,):
|
||||||
TR.assert_template(layout.text_content(), "reset__select_word_x_of_y_template")
|
TR.assert_template(layout.text_content(), "reset__select_word_x_of_y_template")
|
||||||
for _ in range(3):
|
for _ in range(3):
|
||||||
# "Select word 3 of 20"
|
# "Select word 3 of 20"
|
||||||
@ -139,11 +139,22 @@ def confirm_words(debug: "DebugLink", words: list[str]) -> None:
|
|||||||
]
|
]
|
||||||
wanted_word = words[word_pos - 1].lower()
|
wanted_word = words[word_pos - 1].lower()
|
||||||
button_pos = btn_texts.index(wanted_word)
|
button_pos = btn_texts.index(wanted_word)
|
||||||
if debug.model is models.T3T1:
|
layout = debug.click(buttons.RESET_WORD_CHECK[button_pos], wait=True)
|
||||||
btn_positions = buttons.VERTICAL_MENU
|
elif debug.model in (models.T3T1,):
|
||||||
else:
|
TR.assert_template(layout.subtitle(), "reset__select_word_x_of_y_template")
|
||||||
btn_positions = buttons.RESET_WORD_CHECK
|
for _ in range(3):
|
||||||
layout = debug.click(btn_positions[button_pos], wait=True)
|
# "Select word 3 of 20"
|
||||||
|
# ^
|
||||||
|
word_pos_match = re.search(r"\d+", debug.wait_layout().subtitle())
|
||||||
|
assert word_pos_match is not None
|
||||||
|
word_pos = int(word_pos_match.group(0))
|
||||||
|
# Unifying both the buttons and words to lowercase
|
||||||
|
btn_texts = [
|
||||||
|
text.lower() for text in layout.tt_check_seed_button_contents()
|
||||||
|
]
|
||||||
|
wanted_word = words[word_pos - 1].lower()
|
||||||
|
button_pos = btn_texts.index(wanted_word)
|
||||||
|
layout = debug.click(buttons.VERTICAL_MENU[button_pos], wait=True)
|
||||||
elif debug.model in (models.T2B1,):
|
elif debug.model in (models.T2B1,):
|
||||||
TR.assert_in(layout.text_content(), "reset__select_correct_word")
|
TR.assert_in(layout.text_content(), "reset__select_correct_word")
|
||||||
layout = debug.press_right(wait=True)
|
layout = debug.press_right(wait=True)
|
||||||
|
@ -18,7 +18,7 @@ from typing import TYPE_CHECKING
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from trezorlib import device, messages
|
from trezorlib import device, messages, models
|
||||||
|
|
||||||
from ..common import EXTERNAL_ENTROPY, WITH_MOCK_URANDOM, generate_entropy
|
from ..common import EXTERNAL_ENTROPY, WITH_MOCK_URANDOM, generate_entropy
|
||||||
from . import reset
|
from . import reset
|
||||||
@ -78,6 +78,9 @@ def test_backup_slip39_custom(
|
|||||||
if share_count > 1:
|
if share_count > 1:
|
||||||
# confirm shamir warning
|
# confirm shamir warning
|
||||||
reset.confirm_read(debug, middle_r=True)
|
reset.confirm_read(debug, middle_r=True)
|
||||||
|
else:
|
||||||
|
# confirm backup intro
|
||||||
|
reset.confirm_read(debug, middle_r=True)
|
||||||
|
|
||||||
all_words: list[str] = []
|
all_words: list[str] = []
|
||||||
for _ in range(share_count):
|
for _ in range(share_count):
|
||||||
@ -93,6 +96,9 @@ def test_backup_slip39_custom(
|
|||||||
all_words.append(" ".join(words))
|
all_words.append(" ".join(words))
|
||||||
|
|
||||||
# confirm backup done
|
# confirm backup done
|
||||||
|
if debug.model is models.T3T1 and share_count > 1:
|
||||||
|
reset.confirm_read(debug)
|
||||||
|
elif debug.model != models.T3T1:
|
||||||
reset.confirm_read(debug)
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
# generate secret locally
|
# generate secret locally
|
||||||
|
@ -55,6 +55,9 @@ def test_repeated_backup(
|
|||||||
# confirm back up
|
# confirm back up
|
||||||
reset.confirm_read(debug)
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
|
# confirm backup intro
|
||||||
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
# confirm backup warning
|
# confirm backup warning
|
||||||
reset.confirm_read(debug, middle_r=True)
|
reset.confirm_read(debug, middle_r=True)
|
||||||
|
|
||||||
@ -138,6 +141,9 @@ def test_repeated_backup(
|
|||||||
|
|
||||||
debug.wait_layout()
|
debug.wait_layout()
|
||||||
|
|
||||||
|
# confirm backup intro
|
||||||
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
# confirm checklist
|
# confirm checklist
|
||||||
reset.confirm_read(debug)
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
|
@ -52,6 +52,9 @@ def test_reset_bip39(device_handler: "BackgroundDeviceHandler"):
|
|||||||
# confirm back up
|
# confirm back up
|
||||||
reset.confirm_read(debug)
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
|
# confirm backup intro
|
||||||
|
reset.confirm_read(debug, middle_r=True)
|
||||||
|
|
||||||
# confirm backup warning
|
# confirm backup warning
|
||||||
reset.confirm_read(debug, middle_r=True)
|
reset.confirm_read(debug, middle_r=True)
|
||||||
|
|
||||||
|
@ -64,6 +64,9 @@ def test_reset_slip39_advanced(
|
|||||||
# confirm back up
|
# confirm back up
|
||||||
reset.confirm_read(debug)
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
|
# confirm backup intro
|
||||||
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
# confirm checklist
|
# confirm checklist
|
||||||
reset.confirm_read(debug)
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
|
@ -61,6 +61,9 @@ def test_reset_slip39_basic(
|
|||||||
# confirm back up
|
# confirm back up
|
||||||
reset.confirm_read(debug)
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
|
# confirm backup intro
|
||||||
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
# confirm checklist
|
# confirm checklist
|
||||||
reset.confirm_read(debug)
|
reset.confirm_read(debug)
|
||||||
|
|
||||||
|
@ -1275,8 +1275,9 @@ class InputFlowBip39Backup(InputFlowBase):
|
|||||||
self.mnemonic = None
|
self.mnemonic = None
|
||||||
|
|
||||||
def input_flow_common(self) -> BRGeneratorType:
|
def input_flow_common(self) -> BRGeneratorType:
|
||||||
# 1. Confirm Reset
|
# 1. Backup intro
|
||||||
yield from click_through(self.debug, screens=1, code=B.ResetDevice)
|
# 2. Backup warning
|
||||||
|
yield from click_through(self.debug, screens=2, code=B.ResetDevice)
|
||||||
|
|
||||||
# mnemonic phrases and rest
|
# mnemonic phrases and rest
|
||||||
self.mnemonic = yield from get_mnemonic_and_confirm_success(self.debug)
|
self.mnemonic = yield from get_mnemonic_and_confirm_success(self.debug)
|
||||||
@ -1291,8 +1292,9 @@ class InputFlowBip39ResetBackup(InputFlowBase):
|
|||||||
def input_flow_tt(self) -> BRGeneratorType:
|
def input_flow_tt(self) -> BRGeneratorType:
|
||||||
# 1. Confirm Reset
|
# 1. Confirm Reset
|
||||||
# 2. Backup your seed
|
# 2. Backup your seed
|
||||||
# 3. Confirm warning
|
# 3. Backup intro
|
||||||
yield from click_through(self.debug, screens=3, code=B.ResetDevice)
|
# 4. Confirm warning
|
||||||
|
yield from click_through(self.debug, screens=4, code=B.ResetDevice)
|
||||||
|
|
||||||
# mnemonic phrases and rest
|
# mnemonic phrases and rest
|
||||||
self.mnemonic = yield from get_mnemonic_and_confirm_success(self.debug)
|
self.mnemonic = yield from get_mnemonic_and_confirm_success(self.debug)
|
||||||
@ -1300,16 +1302,19 @@ class InputFlowBip39ResetBackup(InputFlowBase):
|
|||||||
def input_flow_tr(self) -> BRGeneratorType:
|
def input_flow_tr(self) -> BRGeneratorType:
|
||||||
# 1. Confirm Reset
|
# 1. Confirm Reset
|
||||||
# 2. Backup your seed
|
# 2. Backup your seed
|
||||||
# 3. Confirm warning
|
# 3. Backup intro
|
||||||
yield from click_through(self.debug, screens=3, code=B.ResetDevice)
|
# 4. Confirm warning
|
||||||
|
yield from click_through(self.debug, screens=4, code=B.ResetDevice)
|
||||||
|
|
||||||
# mnemonic phrases and rest
|
# mnemonic phrases and rest
|
||||||
self.mnemonic = yield from get_mnemonic_and_confirm_success(self.debug)
|
self.mnemonic = yield from get_mnemonic_and_confirm_success(self.debug)
|
||||||
|
|
||||||
def input_flow_t3t1(self) -> BRGeneratorType:
|
def input_flow_t3t1(self) -> BRGeneratorType:
|
||||||
# 1. Confirm Reset x3
|
# 1. Confirm Reset
|
||||||
# 2. Backup your seed
|
# 2. Wallet created
|
||||||
# 3. Confirm warning
|
# 3. Backup your seed
|
||||||
|
# 4. Backup intro
|
||||||
|
# 5. Confirm warning
|
||||||
yield from click_through(self.debug, screens=5, code=B.ResetDevice)
|
yield from click_through(self.debug, screens=5, code=B.ResetDevice)
|
||||||
|
|
||||||
# mnemonic phrases and rest
|
# mnemonic phrases and rest
|
||||||
@ -1345,6 +1350,10 @@ class InputFlowBip39ResetPIN(InputFlowBase):
|
|||||||
assert br.code == B.ResetDevice
|
assert br.code == B.ResetDevice
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
|
||||||
|
br = yield # Backup intro
|
||||||
|
assert br.code == B.ResetDevice
|
||||||
|
self.debug.press_yes()
|
||||||
|
|
||||||
# mnemonic phrases
|
# mnemonic phrases
|
||||||
self.mnemonic = yield from read_and_confirm_mnemonic(self.debug)
|
self.mnemonic = yield from read_and_confirm_mnemonic(self.debug)
|
||||||
|
|
||||||
@ -1363,11 +1372,12 @@ class InputFlowBip39ResetFailedCheck(InputFlowBase):
|
|||||||
self.mnemonic = None
|
self.mnemonic = None
|
||||||
|
|
||||||
def input_flow_common(self) -> BRGeneratorType:
|
def input_flow_common(self) -> BRGeneratorType:
|
||||||
screens = 4 if self.debug.model is models.T3T1 else 3
|
screens = 5 if self.debug.model is models.T3T1 else 4
|
||||||
# 1. Confirm Reset
|
# 1. Confirm Reset
|
||||||
# 1a. (T3T1) done
|
# 1a. (T3T1) Walet Creation done
|
||||||
# 2. Backup your seed
|
# 2. Confirm backup prompt
|
||||||
# 3. Confirm warning
|
# 3. Backup your seed
|
||||||
|
# 4. Confirm warning
|
||||||
yield from click_through(self.debug, screens=screens, code=B.ResetDevice)
|
yield from click_through(self.debug, screens=screens, code=B.ResetDevice)
|
||||||
|
|
||||||
# mnemonic phrases, wrong answer
|
# mnemonic phrases, wrong answer
|
||||||
@ -1417,21 +1427,23 @@ class InputFlowSlip39BasicBackup(InputFlowBase):
|
|||||||
self.click_info = click_info
|
self.click_info = click_info
|
||||||
|
|
||||||
def input_flow_tt(self) -> BRGeneratorType:
|
def input_flow_tt(self) -> BRGeneratorType:
|
||||||
yield # 1. Checklist
|
yield # 1. Backup intro
|
||||||
|
self.debug.press_yes()
|
||||||
|
yield # 2. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
if self.click_info:
|
if self.click_info:
|
||||||
yield from click_info_button_tt(self.debug)
|
yield from click_info_button_tt(self.debug)
|
||||||
yield # 2. Number of shares (5)
|
yield # 3. Number of shares (5)
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 3. Checklist
|
yield # 4. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
if self.click_info:
|
if self.click_info:
|
||||||
yield from click_info_button_tt(self.debug)
|
yield from click_info_button_tt(self.debug)
|
||||||
yield # 4. Threshold (3)
|
yield # 5. Threshold (3)
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 5. Checklist
|
yield # 6. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 6. Confirm show seeds
|
yield # 7. Confirm show seeds
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
|
||||||
# Mnemonic phrases
|
# Mnemonic phrases
|
||||||
@ -1442,21 +1454,23 @@ class InputFlowSlip39BasicBackup(InputFlowBase):
|
|||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
|
||||||
def input_flow_tr(self) -> BRGeneratorType:
|
def input_flow_tr(self) -> BRGeneratorType:
|
||||||
yield # 1. Checklist
|
yield # 1. Backup intro
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 1.5 Number of shares info
|
yield # 2. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 2. Number of shares (5)
|
yield # 2.5 Number of shares info
|
||||||
|
self.debug.press_yes()
|
||||||
|
yield # 3. Number of shares (5)
|
||||||
self.debug.input("5")
|
self.debug.input("5")
|
||||||
yield # 3. Checklist
|
yield # 4. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 3.5 Threshold info
|
yield # 4.5 Threshold info
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 4. Threshold (3)
|
yield # 5. Threshold (3)
|
||||||
self.debug.input("3")
|
self.debug.input("3")
|
||||||
yield # 5. Checklist
|
yield # 6. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 6. Confirm show seeds
|
yield # 7. Confirm show seeds
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
|
||||||
# Mnemonic phrases
|
# Mnemonic phrases
|
||||||
@ -1467,22 +1481,25 @@ class InputFlowSlip39BasicBackup(InputFlowBase):
|
|||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
|
||||||
def input_flow_t3t1(self) -> BRGeneratorType:
|
def input_flow_t3t1(self) -> BRGeneratorType:
|
||||||
yield # 1. Checklist
|
yield # 1. Backup intro
|
||||||
|
self.debug.wait_layout()
|
||||||
|
self.debug.swipe_up()
|
||||||
|
yield # 2. Checklist
|
||||||
self.debug.wait_layout()
|
self.debug.wait_layout()
|
||||||
self.debug.swipe_up(wait=True)
|
self.debug.swipe_up(wait=True)
|
||||||
if self.click_info:
|
if self.click_info:
|
||||||
click_info_button_mercury(self.debug)
|
click_info_button_mercury(self.debug)
|
||||||
yield # 2. Number of shares (5)
|
yield # 3. Number of shares (5)
|
||||||
self.debug.swipe_up()
|
self.debug.swipe_up()
|
||||||
yield # 3. Checklist
|
yield # 4. Checklist
|
||||||
self.debug.swipe_up(wait=True)
|
self.debug.swipe_up(wait=True)
|
||||||
if self.click_info:
|
if self.click_info:
|
||||||
click_info_button_mercury(self.debug)
|
click_info_button_mercury(self.debug)
|
||||||
yield # 4. Threshold (3)
|
yield # 5. Threshold (3)
|
||||||
self.debug.swipe_up()
|
self.debug.swipe_up()
|
||||||
yield # 5. Checklist
|
yield # 6. Checklist
|
||||||
self.debug.swipe_up()
|
self.debug.swipe_up()
|
||||||
yield # 6. Confirm show seeds
|
yield # 7. Confirm show seeds
|
||||||
self.debug.swipe_up()
|
self.debug.swipe_up()
|
||||||
|
|
||||||
# Mnemonic phrases
|
# Mnemonic phrases
|
||||||
@ -1501,13 +1518,14 @@ class InputFlowSlip39BasicResetRecovery(InputFlowBase):
|
|||||||
def input_flow_tt(self) -> BRGeneratorType:
|
def input_flow_tt(self) -> BRGeneratorType:
|
||||||
# 1. Confirm Reset
|
# 1. Confirm Reset
|
||||||
# 2. Backup your seed
|
# 2. Backup your seed
|
||||||
# 3. Confirm warning
|
# 3. Backup intro
|
||||||
# 4. shares info
|
# 4. Confirm warning
|
||||||
# 5. Set & Confirm number of shares
|
# 5. shares info
|
||||||
# 6. threshold info
|
# 6. Set & Confirm number of shares
|
||||||
# 7. Set & confirm threshold value
|
# 7. threshold info
|
||||||
# 8. Confirm show seeds
|
# 8. Set & confirm threshold value
|
||||||
yield from click_through(self.debug, screens=8, code=B.ResetDevice)
|
# 9. Confirm show seeds
|
||||||
|
yield from click_through(self.debug, screens=9, code=B.ResetDevice)
|
||||||
|
|
||||||
# Mnemonic phrases
|
# Mnemonic phrases
|
||||||
self.mnemonics = yield from load_N_shares(self.debug, 5)
|
self.mnemonics = yield from load_N_shares(self.debug, 5)
|
||||||
@ -1521,6 +1539,8 @@ class InputFlowSlip39BasicResetRecovery(InputFlowBase):
|
|||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # Backup your seed
|
yield # Backup your seed
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
yield # Backup intro
|
||||||
|
self.debug.press_yes()
|
||||||
yield # Checklist
|
yield # Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # Number of shares info
|
yield # Number of shares info
|
||||||
@ -1547,9 +1567,9 @@ class InputFlowSlip39BasicResetRecovery(InputFlowBase):
|
|||||||
|
|
||||||
def input_flow_t3t1(self) -> BRGeneratorType:
|
def input_flow_t3t1(self) -> BRGeneratorType:
|
||||||
# 1. Confirm Reset
|
# 1. Confirm Reset
|
||||||
# 2. Backup your seed
|
# 2. Wallet Created
|
||||||
# 3. Confirm warning
|
# 3. Backup your seed
|
||||||
# 4. shares info
|
# 4. Backup intro
|
||||||
# 5. Set & Confirm number of shares
|
# 5. Set & Confirm number of shares
|
||||||
# 6. threshold info
|
# 6. threshold info
|
||||||
# 7. Set & confirm threshold value
|
# 7. Set & confirm threshold value
|
||||||
@ -1576,6 +1596,9 @@ class InputFlowSlip39CustomBackup(InputFlowBase):
|
|||||||
if self.share_count > 1:
|
if self.share_count > 1:
|
||||||
yield # Checklist
|
yield # Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
else:
|
||||||
|
yield # Backup intro
|
||||||
|
self.debug.press_yes()
|
||||||
|
|
||||||
yield # Confirm show seeds
|
yield # Confirm show seeds
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
@ -1591,6 +1614,9 @@ class InputFlowSlip39CustomBackup(InputFlowBase):
|
|||||||
if self.share_count > 1:
|
if self.share_count > 1:
|
||||||
yield # Checklist
|
yield # Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
else:
|
||||||
|
yield # Backup intro
|
||||||
|
self.debug.press_yes()
|
||||||
|
|
||||||
yield # Confirm show seeds
|
yield # Confirm show seeds
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
@ -1606,6 +1632,9 @@ class InputFlowSlip39CustomBackup(InputFlowBase):
|
|||||||
if self.share_count > 1:
|
if self.share_count > 1:
|
||||||
yield # Checklist
|
yield # Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
else:
|
||||||
|
yield # Backup intro
|
||||||
|
self.debug.press_yes()
|
||||||
|
|
||||||
yield # Confirm show seeds
|
yield # Confirm show seeds
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
@ -1643,19 +1672,21 @@ class InputFlowSlip39AdvancedBackup(InputFlowBase):
|
|||||||
self.click_info = click_info
|
self.click_info = click_info
|
||||||
|
|
||||||
def input_flow_tt(self) -> BRGeneratorType:
|
def input_flow_tt(self) -> BRGeneratorType:
|
||||||
yield # 1. Checklist
|
yield # 1. Backup intro
|
||||||
|
self.debug.press_yes()
|
||||||
|
yield # 2. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
if self.click_info:
|
if self.click_info:
|
||||||
yield from click_info_button_tt(self.debug)
|
yield from click_info_button_tt(self.debug)
|
||||||
yield # 2. Set and confirm group count
|
yield # 3. Set and confirm group count
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 3. Checklist
|
yield # 4. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
if self.click_info:
|
if self.click_info:
|
||||||
yield from click_info_button_tt(self.debug)
|
yield from click_info_button_tt(self.debug)
|
||||||
yield # 4. Set and confirm group threshold
|
yield # 5. Set and confirm group threshold
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 5. Checklist
|
yield # 6. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
for _ in range(5): # for each of 5 groups
|
for _ in range(5): # for each of 5 groups
|
||||||
if self.click_info:
|
if self.click_info:
|
||||||
@ -1677,15 +1708,17 @@ class InputFlowSlip39AdvancedBackup(InputFlowBase):
|
|||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
|
||||||
def input_flow_tr(self) -> BRGeneratorType:
|
def input_flow_tr(self) -> BRGeneratorType:
|
||||||
yield # 1. Checklist
|
yield # 1. Backup intro
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 2. Set and confirm group count
|
yield # 2. Checklist
|
||||||
|
self.debug.press_yes()
|
||||||
|
yield # 3. Set and confirm group count
|
||||||
self.debug.input("5")
|
self.debug.input("5")
|
||||||
yield # 3. Checklist
|
yield # 4. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # 4. Set and confirm group threshold
|
yield # 5. Set and confirm group threshold
|
||||||
self.debug.input("3")
|
self.debug.input("3")
|
||||||
yield # 5. Checklist
|
yield # 6. Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
for _ in range(5): # for each of 5 groups
|
for _ in range(5): # for each of 5 groups
|
||||||
yield # Number of shares info
|
yield # Number of shares info
|
||||||
@ -1707,19 +1740,22 @@ class InputFlowSlip39AdvancedBackup(InputFlowBase):
|
|||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
|
||||||
def input_flow_t3t1(self) -> BRGeneratorType:
|
def input_flow_t3t1(self) -> BRGeneratorType:
|
||||||
yield # 1. Checklist
|
yield # 1. Backup intro
|
||||||
|
self.debug.wait_layout()
|
||||||
|
self.debug.swipe_up()
|
||||||
|
yield # 2. Checklist
|
||||||
self.debug.swipe_up(wait=True)
|
self.debug.swipe_up(wait=True)
|
||||||
if self.click_info:
|
if self.click_info:
|
||||||
click_info_button_mercury(self.debug)
|
click_info_button_mercury(self.debug)
|
||||||
yield # 2. Set and confirm group count
|
yield # 3. Set and confirm group count
|
||||||
self.debug.swipe_up()
|
self.debug.swipe_up()
|
||||||
yield # 3. Checklist
|
yield # 4. Checklist
|
||||||
self.debug.swipe_up(wait=True)
|
self.debug.swipe_up(wait=True)
|
||||||
if self.click_info:
|
if self.click_info:
|
||||||
click_info_button_mercury(self.debug)
|
click_info_button_mercury(self.debug)
|
||||||
yield # 4. Set and confirm group threshold
|
yield # 5. Set and confirm group threshold
|
||||||
self.debug.swipe_up()
|
self.debug.swipe_up()
|
||||||
yield # 5. Checklist
|
yield # 6. Checklist
|
||||||
self.debug.swipe_up(wait=True)
|
self.debug.swipe_up(wait=True)
|
||||||
for _i in range(5): # for each of 5 groups
|
for _i in range(5): # for each of 5 groups
|
||||||
if self.click_info:
|
if self.click_info:
|
||||||
@ -1750,16 +1786,17 @@ class InputFlowSlip39AdvancedResetRecovery(InputFlowBase):
|
|||||||
def input_flow_tt(self) -> BRGeneratorType:
|
def input_flow_tt(self) -> BRGeneratorType:
|
||||||
# 1. Confirm Reset
|
# 1. Confirm Reset
|
||||||
# 2. Backup your seed
|
# 2. Backup your seed
|
||||||
# 3. Confirm warning
|
# 3. Backup intro
|
||||||
# 4. shares info
|
# 4. Confirm warning
|
||||||
# 5. Set & Confirm number of groups
|
# 5. shares info
|
||||||
# 6. threshold info
|
# 6. Set & Confirm number of groups
|
||||||
# 7. Set & confirm group threshold value
|
# 7. threshold info
|
||||||
# 8-17: for each of 5 groups:
|
# 8. Set & confirm group threshold value
|
||||||
|
# 9-18: for each of 5 groups:
|
||||||
# 1. Set & Confirm number of shares
|
# 1. Set & Confirm number of shares
|
||||||
# 2. Set & confirm share threshold value
|
# 2. Set & confirm share threshold value
|
||||||
# 18. Confirm show seeds
|
# 19. Confirm show seeds
|
||||||
yield from click_through(self.debug, screens=18, code=B.ResetDevice)
|
yield from click_through(self.debug, screens=19, code=B.ResetDevice)
|
||||||
|
|
||||||
# Mnemonic phrases - show & confirm shares for all groups
|
# Mnemonic phrases - show & confirm shares for all groups
|
||||||
self.mnemonics = yield from load_5_groups_5_shares(self.debug)
|
self.mnemonics = yield from load_5_groups_5_shares(self.debug)
|
||||||
@ -1773,6 +1810,8 @@ class InputFlowSlip39AdvancedResetRecovery(InputFlowBase):
|
|||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # Wallet creation
|
yield # Wallet creation
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
yield # Backup intro
|
||||||
|
self.debug.press_yes()
|
||||||
yield # Checklist
|
yield # Checklist
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
yield # Set and confirm group count
|
yield # Set and confirm group count
|
||||||
@ -1804,17 +1843,19 @@ class InputFlowSlip39AdvancedResetRecovery(InputFlowBase):
|
|||||||
|
|
||||||
def input_flow_t3t1(self) -> BRGeneratorType:
|
def input_flow_t3t1(self) -> BRGeneratorType:
|
||||||
# 1. Confirm Reset
|
# 1. Confirm Reset
|
||||||
# 2. Backup your seed
|
# 2. Wallet Created
|
||||||
# 3. Confirm warning
|
# 3. Prompt Backup
|
||||||
# 4. shares info
|
# 4. Backup intro
|
||||||
# 5. Set & Confirm number of groups
|
# 5. Confirm warning
|
||||||
# 6. threshold info
|
# 6. shares info
|
||||||
# 7. Set & confirm group threshold value
|
# 7. Set & Confirm number of groups
|
||||||
# 8-17: for each of 5 groups:
|
# 8. threshold info
|
||||||
|
# 9. Set & confirm group threshold value
|
||||||
|
# 10-19: for each of 5 groups:
|
||||||
# 1. Set & Confirm number of shares
|
# 1. Set & Confirm number of shares
|
||||||
# 2. Set & confirm share threshold value
|
# 2. Set & confirm share threshold value
|
||||||
# 18. Confirm show seeds
|
# 20. Confirm show seeds
|
||||||
yield from click_through(self.debug, screens=19, code=B.ResetDevice)
|
yield from click_through(self.debug, screens=20, code=B.ResetDevice)
|
||||||
|
|
||||||
# Mnemonic phrases - show & confirm shares for all groups
|
# Mnemonic phrases - show & confirm shares for all groups
|
||||||
self.mnemonics = yield from load_5_groups_5_shares(self.debug)
|
self.mnemonics = yield from load_5_groups_5_shares(self.debug)
|
||||||
|
Loading…
Reference in New Issue
Block a user