1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-06-15 04:28:46 +00:00

feat(eckhart): implement missing eckhart tests and flows

This commit is contained in:
Lukas Bielesch 2025-04-11 12:45:15 +02:00 committed by obrusvit
parent 4e34d98794
commit 8240276af5
57 changed files with 9022 additions and 3430 deletions

View File

@ -325,7 +325,18 @@ class LayoutContent(UnstructuredJSONReader):
def button_contents(self) -> list[str]: def button_contents(self) -> list[str]:
"""Getting list of button contents.""" """Getting list of button contents."""
buttons = self.find_unique_value_by_key("buttons", default={}, only_type=dict)
if self.action_bar() != "":
# ActionBar is used in Eckhart layout
buttons = self.find_unique_value_by_key(
"ActionBar", default={}, only_type=dict
)
button_keys = ("left_button", "", "right_button")
else:
buttons = self.find_unique_value_by_key(
"buttons", default={}, only_type=dict
)
button_keys = ("left_btn", "middle_btn", "right_btn")
def get_button_content(btn_key: str) -> str: def get_button_content(btn_key: str) -> str:
button_obj = buttons.get(btn_key, {}) button_obj = buttons.get(btn_key, {})
@ -342,7 +353,6 @@ class LayoutContent(UnstructuredJSONReader):
# default value # default value
return "-" return "-"
button_keys = ("left_btn", "middle_btn", "right_btn")
return [get_button_content(btn_key) for btn_key in button_keys] return [get_button_content(btn_key) for btn_key in button_keys]
def seed_words(self) -> list[str]: def seed_words(self) -> list[str]:

View File

@ -439,7 +439,6 @@ def test_dryrun_enter_word_slowly(device_handler: "BackgroundDeviceHandler"):
@pytest.mark.setup_client(pin=PIN4) @pytest.mark.setup_client(pin=PIN4)
@pytest.mark.models(skip=["eckhart"])
def test_autolock_does_not_interrupt_preauthorized( def test_autolock_does_not_interrupt_preauthorized(
device_handler: "BackgroundDeviceHandler", device_handler: "BackgroundDeviceHandler",
): ):

View File

@ -22,7 +22,7 @@ from trezorlib import device, exceptions, messages
from ..common import MOCK_GET_ENTROPY from ..common import MOCK_GET_ENTROPY
from . import recovery, reset from . import recovery, reset
from .common import go_next, LayoutType from .common import go_next
if TYPE_CHECKING: if TYPE_CHECKING:
from ..device_handler import BackgroundDeviceHandler from ..device_handler import BackgroundDeviceHandler
@ -79,9 +79,6 @@ def test_repeated_backup(
reset.confirm_read(debug) reset.confirm_read(debug)
# confirm backup done # confirm backup done
reset.confirm_read(debug) reset.confirm_read(debug)
# Your backup is done
if debug.layout_type is not LayoutType.Eckhart:
go_next(debug)
# retrieve the result to check that it does not raise a failure # retrieve the result to check that it does not raise a failure
device_handler.result() device_handler.result()

View File

@ -34,8 +34,6 @@ from .signtx import (
request_output, request_output,
) )
pytestmark = pytest.mark.models(skip=["eckhart"])
B = messages.ButtonRequestType B = messages.ButtonRequestType
TX_CACHE_TESTNET = TxCache("Testnet") TX_CACHE_TESTNET = TxCache("Testnet")

View File

@ -153,9 +153,6 @@ VECTORS_DESCRIPTORS = ( # coin, account, script_type, descriptors
) )
pytestmark = pytest.mark.models(skip=["eckhart"])
def _address_n(purpose, coin, account, script_type): def _address_n(purpose, coin, account, script_type):
res = [H_(purpose), H_(0) if coin == "Bitcoin" else H_(1), H_(account)] res = [H_(purpose), H_(0) if coin == "Bitcoin" else H_(1), H_(account)]
if purpose == 10025 and script_type == messages.InputScriptType.SPENDTAPROOT: if purpose == 10025 and script_type == messages.InputScriptType.SPENDTAPROOT:

View File

@ -244,7 +244,7 @@ VECTORS_MULTISIG = ( # script_type, bip48_type, address, xpubs, ignore_xpub_mag
) )
@pytest.mark.models("core", skip=["eckhart"]) @pytest.mark.models("core")
@pytest.mark.multisig @pytest.mark.multisig
@pytest.mark.parametrize( @pytest.mark.parametrize(
"script_type, bip48_type, address, xpubs, ignore_xpub_magic", VECTORS_MULTISIG "script_type, bip48_type, address, xpubs, ignore_xpub_magic", VECTORS_MULTISIG

View File

@ -24,8 +24,6 @@ from ...common import is_core
from ...input_flows import InputFlowConfirmAllWarnings from ...input_flows import InputFlowConfirmAllWarnings
from .signtx import forge_prevtx from .signtx import forge_prevtx
pytestmark = pytest.mark.models(skip=["eckhart"])
VECTORS = ( # path, script_types VECTORS = ( # path, script_types
# GreenAddress A m/[1,4]/address_index # GreenAddress A m/[1,4]/address_index
( (

View File

@ -35,8 +35,6 @@ from ...input_flows import (
S = messages.InputScriptType S = messages.InputScriptType
pytestmark = pytest.mark.models(skip=["eckhart"])
def case( def case(
id: str, id: str,

View File

@ -33,7 +33,7 @@ PREV_HASH, PREV_TX = forge_prevtx([(INPUT_ADDRESS, 12_300_000)], network="testne
PREV_TXES = {PREV_HASH: PREV_TX} PREV_TXES = {PREV_HASH: PREV_TX}
pytestmark = [pytest.mark.models("core", skip=["eckhart"]), pytest.mark.experimental] pytestmark = [pytest.mark.models("core"), pytest.mark.experimental]
def case(id, *args, altcoin: bool = False, models: str | None = None): def case(id, *args, altcoin: bool = False, models: str | None = None):

View File

@ -32,8 +32,6 @@ from .signtx import (
request_output, request_output,
) )
pytestmark = pytest.mark.models(skip=["eckhart"])
B = messages.ButtonRequestType B = messages.ButtonRequestType
TX_CACHE_TESTNET = TxCache("Testnet") TX_CACHE_TESTNET = TxCache("Testnet")

View File

@ -23,8 +23,6 @@ from trezorlib.debuglink import TrezorClientDebugLink as Client
from ...input_flows import InputFlowSignVerifyMessageLong from ...input_flows import InputFlowSignVerifyMessageLong
pytestmark = pytest.mark.models(skip=["eckhart"])
@pytest.mark.models("legacy") @pytest.mark.models("legacy")
def test_message_long_legacy(client: Client): def test_message_long_legacy(client: Client):

View File

@ -14,13 +14,9 @@
# You should have received a copy of the License along with this library. # You should have received a copy of the License along with this library.
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>. # If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
import pytest
from trezorlib import btc from trezorlib import btc
from trezorlib.debuglink import TrezorClientDebugLink as Client from trezorlib.debuglink import TrezorClientDebugLink as Client
pytestmark = pytest.mark.models(skip=["eckhart"])
def test_message_long(client: Client): def test_message_long(client: Client):
ret = btc.verify_message( ret = btc.verify_message(

View File

@ -14,13 +14,9 @@
# You should have received a copy of the License along with this library. # You should have received a copy of the License along with this library.
# If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>. # If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
import pytest
from trezorlib import btc from trezorlib import btc
from trezorlib.debuglink import TrezorClientDebugLink as Client from trezorlib.debuglink import TrezorClientDebugLink as Client
pytestmark = pytest.mark.models(skip=["eckhart"])
def test_message_long(client: Client): def test_message_long(client: Client):
ret = btc.verify_message( ret = btc.verify_message(

View File

@ -29,11 +29,7 @@ from trezorlib.tools import parse_path
from ...common import parametrize_using_common_fixtures from ...common import parametrize_using_common_fixtures
from ...input_flows import InputFlowShowXpubQRCode from ...input_flows import InputFlowShowXpubQRCode
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.cardano, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.cardano,
pytest.mark.models("core", skip=["eckhart"]),
]
@parametrize_using_common_fixtures( @parametrize_using_common_fixtures(

View File

@ -24,11 +24,7 @@ from trezorlib.tools import parse_path
from ...common import MNEMONIC_SLIP39_BASIC_20_3of6 from ...common import MNEMONIC_SLIP39_BASIC_20_3of6
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.cardano, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.cardano,
pytest.mark.models("core", skip=["eckhart"]),
]
ADDRESS_N = parse_path("m/1852h/1815h/0h") ADDRESS_N = parse_path("m/1852h/1815h/0h")

View File

@ -22,11 +22,7 @@ from trezorlib.debuglink import TrezorClientDebugLink as Client
from ...common import parametrize_using_common_fixtures from ...common import parametrize_using_common_fixtures
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.cardano, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.cardano,
pytest.mark.models("core", skip=["eckhart"]),
]
@parametrize_using_common_fixtures( @parametrize_using_common_fixtures(

View File

@ -24,11 +24,7 @@ from trezorlib.exceptions import TrezorFailure
from ...common import parametrize_using_common_fixtures from ...common import parametrize_using_common_fixtures
from ...input_flows import InputFlowConfirmAllWarnings from ...input_flows import InputFlowConfirmAllWarnings
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.cardano, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.cardano,
pytest.mark.models("core", skip=["eckhart"]),
]
def show_details_input_flow(client: Client): def show_details_input_flow(client: Client):

View File

@ -26,7 +26,7 @@ from ...input_flows import InputFlowShowXpubQRCode
@pytest.mark.altcoin @pytest.mark.altcoin
@pytest.mark.eos @pytest.mark.eos
@pytest.mark.models("t2t1", skip=["eckhart"]) @pytest.mark.models("t2t1")
@pytest.mark.setup_client(mnemonic=MNEMONIC12) @pytest.mark.setup_client(mnemonic=MNEMONIC12)
def test_eos_get_public_key(client: Client): def test_eos_get_public_key(client: Client):
with client: with client:

View File

@ -29,7 +29,7 @@ ADDRESS_N = parse_path("m/44h/194h/0h/0/0")
pytestmark = [ pytestmark = [
pytest.mark.altcoin, pytest.mark.altcoin,
pytest.mark.eos, pytest.mark.eos,
pytest.mark.models("t2t1", skip=["eckhart"]), pytest.mark.models("t2t1"),
pytest.mark.setup_client(mnemonic=MNEMONIC12), pytest.mark.setup_client(mnemonic=MNEMONIC12),
] ]

View File

@ -13,11 +13,7 @@ from ... import definitions
from ...input_flows import InputFlowConfirmAllWarnings from ...input_flows import InputFlowConfirmAllWarnings
from .test_sign_typed_data import DATA as TYPED_DATA from .test_sign_typed_data import DATA as TYPED_DATA
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.ethereum]
pytest.mark.altcoin,
pytest.mark.ethereum,
pytest.mark.models(skip=["eckhart"]),
]
ERC20_OPERATION = "a9059cbb000000000000000000000000574bbb36871ba6b78e27f4b4dcfb76ea0091880b0000000000000000000000000000000000000000000000000000000000000123" ERC20_OPERATION = "a9059cbb000000000000000000000000574bbb36871ba6b78e27f4b4dcfb76ea0091880b0000000000000000000000000000000000000000000000000000000000000123"
ERC20_BUILTIN_TOKEN = "0xdac17f958d2ee523a2206206994597c13d831ec7" # USDT ERC20_BUILTIN_TOKEN = "0xdac17f958d2ee523a2206206994597c13d831ec7" # USDT

View File

@ -19,11 +19,7 @@ from ...definitions import (
) )
from .test_definitions import DEFAULT_ERC20_PARAMS, ERC20_FAKE_ADDRESS from .test_definitions import DEFAULT_ERC20_PARAMS, ERC20_FAKE_ADDRESS
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.ethereum]
pytest.mark.altcoin,
pytest.mark.ethereum,
pytest.mark.models(skip=["eckhart"]),
]
def fails(client: Client, network: bytes, match: str) -> None: def fails(client: Client, network: bytes, match: str) -> None:

View File

@ -23,11 +23,7 @@ from trezorlib.tools import parse_path
from ...common import parametrize_using_common_fixtures from ...common import parametrize_using_common_fixtures
from ...input_flows import InputFlowShowAddressQRCode from ...input_flows import InputFlowShowAddressQRCode
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.ethereum]
pytest.mark.altcoin,
pytest.mark.ethereum,
pytest.mark.models(skip=["eckhart"]),
]
@parametrize_using_common_fixtures("ethereum/getaddress.json") @parametrize_using_common_fixtures("ethereum/getaddress.json")

View File

@ -23,11 +23,7 @@ from trezorlib.tools import parse_path
from ...common import parametrize_using_common_fixtures from ...common import parametrize_using_common_fixtures
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.ethereum]
pytest.mark.altcoin,
pytest.mark.ethereum,
pytest.mark.models(skip=["eckhart"]),
]
@parametrize_using_common_fixtures("ethereum/getpublickey.json") @parametrize_using_common_fixtures("ethereum/getpublickey.json")

View File

@ -23,11 +23,7 @@ from trezorlib.tools import parse_path
from ...common import parametrize_using_common_fixtures from ...common import parametrize_using_common_fixtures
from ...input_flows import InputFlowEIP712Cancel, InputFlowEIP712ShowMore from ...input_flows import InputFlowEIP712Cancel, InputFlowEIP712ShowMore
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.ethereum]
pytest.mark.altcoin,
pytest.mark.ethereum,
pytest.mark.models(skip=["eckhart"]),
]
@pytest.mark.models("core") @pytest.mark.models("core")

View File

@ -24,11 +24,7 @@ from trezorlib.tools import parse_path
from ...common import parametrize_using_common_fixtures from ...common import parametrize_using_common_fixtures
from ...input_flows import InputFlowSignVerifyMessageLong from ...input_flows import InputFlowSignVerifyMessageLong
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.ethereum]
pytest.mark.altcoin,
pytest.mark.ethereum,
pytest.mark.models(skip=["eckhart"]),
]
@parametrize_using_common_fixtures("ethereum/signmessage.json") @parametrize_using_common_fixtures("ethereum/signmessage.json")

View File

@ -37,11 +37,7 @@ from ...input_flows import (
TO_ADDR = "0x1d1c328764a41bda0492b66baa30c4a339ff85ef" TO_ADDR = "0x1d1c328764a41bda0492b66baa30c4a339ff85ef"
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.ethereum]
pytest.mark.altcoin,
pytest.mark.ethereum,
pytest.mark.models(skip=["eckhart"]),
]
def make_defs(parameters: dict) -> messages.EthereumDefinitions: def make_defs(parameters: dict) -> messages.EthereumDefinitions:

View File

@ -41,7 +41,7 @@ TEST_VECTORS = [
pytestmark = [ pytestmark = [
pytest.mark.altcoin, pytest.mark.altcoin,
pytest.mark.monero, pytest.mark.monero,
pytest.mark.models("core", skip=["eckhart"]), pytest.mark.models("core"),
pytest.mark.setup_client(mnemonic=MNEMONIC12), pytest.mark.setup_client(mnemonic=MNEMONIC12),
] ]

View File

@ -25,7 +25,7 @@ from ...common import MNEMONIC12
@pytest.mark.altcoin @pytest.mark.altcoin
@pytest.mark.monero @pytest.mark.monero
@pytest.mark.models("core", skip=["eckhart"]) @pytest.mark.models("core")
@pytest.mark.setup_client(mnemonic=MNEMONIC12) @pytest.mark.setup_client(mnemonic=MNEMONIC12)
def test_monero_getwatchkey(client: Client): def test_monero_getwatchkey(client: Client):
res = monero.get_watch_key(client, parse_path("m/44h/128h/0h")) res = monero.get_watch_key(client, parse_path("m/44h/128h/0h"))

View File

@ -25,7 +25,7 @@ from ...common import MNEMONIC12
@pytest.mark.altcoin @pytest.mark.altcoin
@pytest.mark.nem @pytest.mark.nem
@pytest.mark.models("t1b1", "t2t1", skip=["eckhart"]) @pytest.mark.models("t1b1", "t2t1")
@pytest.mark.setup_client(mnemonic=MNEMONIC12) @pytest.mark.setup_client(mnemonic=MNEMONIC12)
@pytest.mark.parametrize("chunkify", (True, False)) @pytest.mark.parametrize("chunkify", (True, False))
def test_nem_getaddress(client: Client, chunkify: bool): def test_nem_getaddress(client: Client, chunkify: bool):

View File

@ -27,7 +27,7 @@ ADDRESS_N = parse_path("m/44h/1h/0h/0h/0h")
pytestmark = [ pytestmark = [
pytest.mark.altcoin, pytest.mark.altcoin,
pytest.mark.nem, pytest.mark.nem,
pytest.mark.models("t1b1", "t2t1", skip=["eckhart"]), pytest.mark.models("t1b1", "t2t1"),
pytest.mark.setup_client(mnemonic=MNEMONIC12), pytest.mark.setup_client(mnemonic=MNEMONIC12),
] ]

View File

@ -25,7 +25,7 @@ from ...common import MNEMONIC12
pytestmark = [ pytestmark = [
pytest.mark.altcoin, pytest.mark.altcoin,
pytest.mark.nem, pytest.mark.nem,
pytest.mark.models("t1b1", "t2t1", skip=["eckhart"]), pytest.mark.models("t1b1", "t2t1"),
pytest.mark.setup_client(mnemonic=MNEMONIC12), pytest.mark.setup_client(mnemonic=MNEMONIC12),
] ]

View File

@ -25,7 +25,7 @@ from ...common import MNEMONIC12
pytestmark = [ pytestmark = [
pytest.mark.altcoin, pytest.mark.altcoin,
pytest.mark.nem, pytest.mark.nem,
pytest.mark.models("t1b1", "t2t1", skip=["eckhart"]), pytest.mark.models("t1b1", "t2t1"),
pytest.mark.setup_client(mnemonic=MNEMONIC12), pytest.mark.setup_client(mnemonic=MNEMONIC12),
] ]

View File

@ -25,7 +25,7 @@ from ...common import MNEMONIC12, is_core
pytestmark = [ pytestmark = [
pytest.mark.altcoin, pytest.mark.altcoin,
pytest.mark.nem, pytest.mark.nem,
pytest.mark.models("t1b1", "t2t1", skip=["eckhart"]), pytest.mark.models("t1b1", "t2t1"),
pytest.mark.setup_client(mnemonic=MNEMONIC12), pytest.mark.setup_client(mnemonic=MNEMONIC12),
] ]

View File

@ -22,7 +22,7 @@ import pytest
from trezorlib import messages, nostr from trezorlib import messages, nostr
from trezorlib.tools import parse_path from trezorlib.tools import parse_path
pytestmark = [pytest.mark.altcoin, pytest.mark.models("core", skip=["eckhart"])] pytestmark = [pytest.mark.altcoin, pytest.mark.models("core")]
# test data from NIP-06: https://github.com/nostr-protocol/nips/blob/master/06.md # test data from NIP-06: https://github.com/nostr-protocol/nips/blob/master/06.md

View File

@ -28,11 +28,7 @@ CUSTOM_MNEMONIC = (
"whip snack decide blur unfold fiction pumpkin athlete" "whip snack decide blur unfold fiction pumpkin athlete"
) )
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.ripple, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.ripple,
pytest.mark.models("core", skip=["eckhart"]),
]
# data from https://iancoleman.io/bip39/ # data from https://iancoleman.io/bip39/
TEST_VECTORS = [ TEST_VECTORS = [

View File

@ -21,11 +21,7 @@ from trezorlib.debuglink import TrezorClientDebugLink as Client
from trezorlib.exceptions import TrezorFailure from trezorlib.exceptions import TrezorFailure
from trezorlib.tools import parse_path from trezorlib.tools import parse_path
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.ripple, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.ripple,
pytest.mark.models("core", skip=["eckhart"]),
]
@pytest.mark.parametrize("chunkify", (True, False)) @pytest.mark.parametrize("chunkify", (True, False))

View File

@ -22,11 +22,7 @@ from trezorlib.tools import parse_path
from ...common import parametrize_using_common_fixtures from ...common import parametrize_using_common_fixtures
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.solana, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.solana,
pytest.mark.models("core", skip=["eckhart"]),
]
@parametrize_using_common_fixtures( @parametrize_using_common_fixtures(

View File

@ -22,11 +22,7 @@ from trezorlib.tools import parse_path
from ...common import parametrize_using_common_fixtures from ...common import parametrize_using_common_fixtures
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.solana, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.solana,
pytest.mark.models("core", skip=["eckhart"]),
]
@parametrize_using_common_fixtures( @parametrize_using_common_fixtures(

View File

@ -27,11 +27,7 @@ from ...input_flows import InputFlowConfirmAllWarnings
from .construct.instructions import PROGRAMS, UnknownInstruction from .construct.instructions import PROGRAMS, UnknownInstruction
from .construct.transaction import Message, RawInstruction from .construct.transaction import Message, RawInstruction
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.solana, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.solana,
pytest.mark.models("core", skip=["eckhart"]),
]
@parametrize_using_common_fixtures( @parametrize_using_common_fixtures(

View File

@ -61,11 +61,7 @@ from trezorlib.tools import parse_path
from ...common import parametrize_using_common_fixtures from ...common import parametrize_using_common_fixtures
from ...input_flows import InputFlowShowAddressQRCode from ...input_flows import InputFlowShowAddressQRCode
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.stellar]
pytest.mark.altcoin,
pytest.mark.stellar,
pytest.mark.models(skip=["eckhart"]),
]
def parameters_to_proto(parameters): def parameters_to_proto(parameters):

View File

@ -9,7 +9,7 @@ from trezorlib.debuglink import TrezorClientDebugLink as Client
from ..common import compact_size from ..common import compact_size
pytestmark = pytest.mark.models("safe", skip=["eckhart"]) pytestmark = pytest.mark.models("safe")
ROOT_PUBLIC_KEY = { ROOT_PUBLIC_KEY = {
models.T2B1: bytes.fromhex( models.T2B1: bytes.fromhex(
@ -21,6 +21,9 @@ ROOT_PUBLIC_KEY = {
models.T3B1: bytes.fromhex( models.T3B1: bytes.fromhex(
"047f77368dea2d4d61e989f474a56723c3212dacf8a808d8795595ef38441427c4389bc454f02089d7f08b873005e4c28d432468997871c0bf286fd3861e21e96a" "047f77368dea2d4d61e989f474a56723c3212dacf8a808d8795595ef38441427c4389bc454f02089d7f08b873005e4c28d432468997871c0bf286fd3861e21e96a"
), ),
models.T3W1: bytes.fromhex(
"04521192e173a9da4e3023f747d836563725372681eba3079c56ff11b2fc137ab189eb4155f371127651b5594f8c332fc1e9c0f3b80d4212822668b63189706578"
),
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -23,8 +23,6 @@ from trezorlib.debuglink import LayoutType
from trezorlib.debuglink import TrezorClientDebugLink as Client from trezorlib.debuglink import TrezorClientDebugLink as Client
from trezorlib.tools import parse_path from trezorlib.tools import parse_path
pytestmark = pytest.mark.models(skip=["eckhart"])
PIN = "1234" PIN = "1234"
@ -39,7 +37,9 @@ def _assert_busy(client: Client, should_be_busy: bool, screen: str = "Homescreen
@pytest.mark.setup_client(pin=PIN) @pytest.mark.setup_client(pin=PIN)
def test_busy_state(client: Client): def test_busy_state(client: Client):
_assert_busy(client, False, "Lockscreen")
screen = "Homescreen" if client.layout_type is LayoutType.Eckhart else "Lockscreen"
_assert_busy(client, False, screen)
assert client.features.unlocked is False assert client.features.unlocked is False
# Show busy dialog for 1 minute. # Show busy dialog for 1 minute.

View File

@ -70,7 +70,7 @@ def test_cancel_message_via_initialize(client: Client, message):
assert isinstance(resp, m.Features) assert isinstance(resp, m.Features)
@pytest.mark.models("core", skip=["eckhart"]) @pytest.mark.models("core")
def test_cancel_on_paginated(client: Client): def test_cancel_on_paginated(client: Client):
"""Check that device is responsive on paginated screen. See #1708.""" """Check that device is responsive on paginated screen. See #1708."""
# In #1708, the device would ignore USB (or UDP) events while waiting for the user # In #1708, the device would ignore USB (or UDP) events while waiting for the user

View File

@ -5,16 +5,14 @@ import pytest
from trezorlib import firmware, models from trezorlib import firmware, models
from trezorlib.debuglink import TrezorClientDebugLink as Client from trezorlib.debuglink import TrezorClientDebugLink as Client
pytestmark = pytest.mark.models(skip=["eckhart"]) # size of FIRMWARE_MAXSIZE, see core/embed/models/<model>/model_<model>.h
# size of FIRMWARE_AREA, see core/embed/models/model_*_layout.c
FIRMWARE_LENGTHS = { FIRMWARE_LENGTHS = {
models.T1B1: 7 * 128 * 1024 + 64 * 1024, models.T1B1: 7 * 128 * 1024 + 64 * 1024,
models.T2T1: 13 * 128 * 1024, models.T2T1: 13 * 128 * 1024,
models.T2B1: 13 * 128 * 1024, models.T2B1: 13 * 128 * 1024,
models.T3T1: 208 * 8 * 1024, models.T3T1: 208 * 8 * 1024,
models.T3B1: 208 * 8 * 1024, models.T3B1: 208 * 8 * 1024,
models.T3W1: 208 * 8 * 1024, # FIXME: fill in the correct value models.T3W1: 430 * 8 * 1024,
} }

View File

@ -35,7 +35,7 @@ from ..translations import (
sign_blob, sign_blob,
) )
pytestmark = pytest.mark.models("core", skip=["eckhart"]) pytestmark = pytest.mark.models("core")
MAX_DATA_LENGTH = { MAX_DATA_LENGTH = {

View File

@ -19,6 +19,7 @@ from pathlib import Path
import pytest import pytest
from trezorlib import btc, device, exceptions, messages, misc, models from trezorlib import btc, device, exceptions, messages, misc, models
from trezorlib.debuglink import LayoutType
from trezorlib.debuglink import TrezorClientDebugLink as Client from trezorlib.debuglink import TrezorClientDebugLink as Client
from trezorlib.tools import parse_path from trezorlib.tools import parse_path
@ -222,9 +223,14 @@ def test_apply_homescreen_toif(client: Client):
device.apply_settings(client, homescreen=img) device.apply_settings(client, homescreen=img)
@pytest.mark.models(skip=["legacy", "safe3", "eckhart"]) @pytest.mark.models(skip=["legacy", "safe3"])
def test_apply_homescreen_jpeg(client: Client): def test_apply_homescreen_jpeg(client: Client):
with open(HERE / "test_bg.jpg", "rb") as f: file_name = (
"test_bg_eckhart.jpg"
if client.debug.layout_type is LayoutType.Eckhart
else "test_bg.jpg"
)
with open(HERE / file_name, "rb") as f:
img = f.read() img = f.read()
with client: with client:
_set_expected_responses(client, homescreen=img) _set_expected_responses(client, homescreen=img)
@ -360,7 +366,6 @@ def test_apply_homescreen(client: Client):
@pytest.mark.setup_client(pin=None) @pytest.mark.setup_client(pin=None)
@pytest.mark.models(skip="eckhart")
def test_safety_checks(client: Client): def test_safety_checks(client: Client):
def get_bad_address(): def get_bad_address():
btc.get_address(client, "Bitcoin", parse_path("m/44h"), show_display=True) btc.get_address(client, "Bitcoin", parse_path("m/44h"), show_display=True)

View File

@ -68,8 +68,6 @@ def test_backup_bip39(client: Client):
def test_backup_slip39_basic(client: Client, click_info: bool): def test_backup_slip39_basic(client: Client, click_info: bool):
if click_info and client.layout_type is LayoutType.Caesar: if click_info and client.layout_type is LayoutType.Caesar:
pytest.skip("click_info not implemented on T2B1") pytest.skip("click_info not implemented on T2B1")
if click_info and client.layout_type is LayoutType.Eckhart:
pytest.skip("click_info not yet implemented on T3W1")
assert client.features.backup_availability == messages.BackupAvailability.Required assert client.features.backup_availability == messages.BackupAvailability.Required
@ -129,8 +127,6 @@ def test_backup_slip39_single(client: Client):
def test_backup_slip39_advanced(client: Client, click_info: bool): def test_backup_slip39_advanced(client: Client, click_info: bool):
if click_info and client.layout_type is LayoutType.Caesar: if click_info and client.layout_type is LayoutType.Caesar:
pytest.skip("click_info not implemented on T2B1") pytest.skip("click_info not implemented on T2B1")
if click_info and client.layout_type is LayoutType.Eckhart:
pytest.skip("click_info not yet implemented on T3W1")
assert client.features.backup_availability == messages.BackupAvailability.Required assert client.features.backup_availability == messages.BackupAvailability.Required

View File

@ -181,22 +181,25 @@ def test_change_invalid_current(client: Client):
_check_pin(client, PIN4) _check_pin(client, PIN4)
@pytest.mark.models("delizia") @pytest.mark.models("delizia", "eckhart")
@pytest.mark.setup_client(pin=None) @pytest.mark.setup_client(pin=None)
def test_pin_menu_cancel_setup(client: Client): def test_pin_menu_cancel_setup(client: Client):
def cancel_pin_setup_input_flow(): def cancel_pin_setup_input_flow():
yield yield
# enter context menu if client.layout_type is LayoutType.Delizia:
client.debug.click(client.debug.screen_buttons.menu()) # enter context menu
client.debug.synchronize_at("VerticalMenu") client.debug.click(client.debug.screen_buttons.menu())
# click "Cancel PIN setup" client.debug.synchronize_at("VerticalMenu")
client.debug.click(client.debug.screen_buttons.vertical_menu_items()[0]) # click "Cancel PIN setup"
client.debug.synchronize_at("Paragraphs") client.debug.click(client.debug.screen_buttons.vertical_menu_items()[0])
# swipe through info screen client.debug.synchronize_at("Paragraphs")
client.debug.swipe_up() # swipe through info screen
client.debug.synchronize_at("PromptScreen") client.debug.swipe_up()
# tap to confirm client.debug.synchronize_at("PromptScreen")
client.debug.click(client.debug.screen_buttons.tap_to_confirm()) # tap to confirm
client.debug.click(client.debug.screen_buttons.tap_to_confirm())
elif client.layout_type is LayoutType.Eckhart:
client.debug.press_no()
with client, pytest.raises(Cancelled): with client, pytest.raises(Cancelled):
client.set_input_flow(cancel_pin_setup_input_flow) client.set_input_flow(cancel_pin_setup_input_flow)

View File

@ -279,7 +279,6 @@ def test_recovery_device(client: Client):
) )
@pytest.mark.models(skip=["eckhart"])
def test_sign_message(client: Client): def test_sign_message(client: Client):
_assert_protection(client) _assert_protection(client)
with client: with client:
@ -321,7 +320,7 @@ def test_verify_message_t1(client: Client):
) )
@pytest.mark.models("core", skip=["eckhart"]) @pytest.mark.models("core")
def test_verify_message_t2(client: Client): def test_verify_message_t2(client: Client):
_assert_protection(client) _assert_protection(client)
with client: with client:

View File

@ -22,11 +22,7 @@ from trezorlib.tools import parse_path
from ...input_flows import InputFlowShowAddressQRCode from ...input_flows import InputFlowShowAddressQRCode
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.tezos, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.tezos,
pytest.mark.models("core", skip=["eckhart"]),
]
TEST_VECTORS = [ TEST_VECTORS = [
("m/44h/1729h/0h", "tz1Kef7BSg6fo75jk37WkKRYSnJDs69KVqt9"), ("m/44h/1729h/0h", "tz1Kef7BSg6fo75jk37WkKRYSnJDs69KVqt9"),

View File

@ -23,7 +23,7 @@ from trezorlib.tools import parse_path
@pytest.mark.altcoin @pytest.mark.altcoin
@pytest.mark.tezos @pytest.mark.tezos
@pytest.mark.models("core", skip=["eckhart"]) @pytest.mark.models("core")
def test_tezos_get_public_key(client: Client): def test_tezos_get_public_key(client: Client):
path = parse_path("m/44h/1729h/0h") path = parse_path("m/44h/1729h/0h")
pk = get_public_key(client, path) pk = get_public_key(client, path)

View File

@ -25,11 +25,7 @@ TEZOS_PATH = parse_path("m/44h/1729h/0h")
TEZOS_PATH_10 = parse_path("m/44h/1729h/10h") TEZOS_PATH_10 = parse_path("m/44h/1729h/10h")
TEZOS_PATH_15 = parse_path("m/44h/1729h/15h") TEZOS_PATH_15 = parse_path("m/44h/1729h/15h")
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.tezos, pytest.mark.models("core")]
pytest.mark.altcoin,
pytest.mark.tezos,
pytest.mark.models("core", skip=["eckhart"]),
]
def test_tezos_sign_tx_proposal(client: Client): def test_tezos_sign_tx_proposal(client: Client):

View File

@ -50,11 +50,7 @@ TXHASH_4b6cec = bytes.fromhex(
VERSION_GROUP_ID = 0x26A7270A VERSION_GROUP_ID = 0x26A7270A
BRANCH_ID = 0xC2D6D0B4 BRANCH_ID = 0xC2D6D0B4
pytestmark = [ pytestmark = [pytest.mark.altcoin, pytest.mark.zcash]
pytest.mark.altcoin,
pytest.mark.zcash,
pytest.mark.models(skip=["eckhart"]),
]
def test_version_group_id_missing(client: Client): def test_version_group_id_missing(client: Client):

View File

@ -257,7 +257,26 @@ class InputFlowSignMessagePagination(InputFlowBase):
self.debug.press_yes() self.debug.press_yes()
def input_flow_eckhart(self) -> BRGeneratorType: def input_flow_eckhart(self) -> BRGeneratorType:
assert False, "Not implemented" # collect screen contents into `message_read`.
# Using a helper debuglink function to assemble the final text.
layouts: list[LayoutContent] = []
br = yield # confirm address
self.debug.read_layout()
self.debug.press_yes()
br = yield
assert br.pages is not None
for i in range(br.pages or 1):
layout = self.debug.read_layout()
layouts.append(layout)
if br.pages and i < br.pages - 1:
self.debug.click(self.debug.screen_buttons.ok())
self.message_read = multipage_content(layouts)
self.debug.press_yes()
class InputFlowSignVerifyMessageLong(InputFlowBase): class InputFlowSignVerifyMessageLong(InputFlowBase):
@ -352,7 +371,38 @@ class InputFlowSignVerifyMessageLong(InputFlowBase):
br = yield br = yield
def input_flow_eckhart(self) -> BRGeneratorType: def input_flow_eckhart(self) -> BRGeneratorType:
assert False, "Not implemented" # collect screen contents into `message_read`.
# Using a helper debuglink function to assemble the final text.
layouts: list[LayoutContent] = []
br = yield # confirm address
self.debug.read_layout()
self.debug.press_yes()
br = yield # confirm address intro
self.debug.click(self.debug.screen_buttons.menu())
self.debug.synchronize_at("VerticalMenu")
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[0])
br = yield # confirm address long
self.debug.read_layout()
assert br.pages is not None
for i in range(br.pages):
layout = self.debug.read_layout()
layouts.append(layout)
if i < br.pages - 1:
self.debug.click(self.debug.screen_buttons.ok())
self.message_read = multipage_content(layouts)
self.debug.press_yes()
if self.verify:
# "The signature is valid!" screen
self.debug.press_yes()
br = yield
class InputFlowSignMessageInfo(InputFlowBase): class InputFlowSignMessageInfo(InputFlowBase):
@ -384,15 +434,14 @@ class InputFlowSignMessageInfo(InputFlowBase):
def input_flow_eckhart(self) -> BRGeneratorType: def input_flow_eckhart(self) -> BRGeneratorType:
yield yield
# go to menu # go to info menu
self.debug.click(self.debug.screen_buttons.menu()) self.debug.click(self.debug.screen_buttons.menu())
# show address/message info # close menu
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[0])
self.debug.click(self.debug.screen_buttons.menu()) self.debug.click(self.debug.screen_buttons.menu())
# cancel flow # cancel flow
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[1]) self.debug.press_no()
# confirm cancel # confirm cancel
self.debug.click(self.debug.screen_buttons.ok()) self.debug.press_yes()
yield yield
@ -733,6 +782,10 @@ class InputFlowShowMultisigXPUBs(InputFlowBase):
assert "Multisig 2 of 3" in layout.screen_content() assert "Multisig 2 of 3" in layout.screen_content()
assert TR.address_details__derivation_path in layout.screen_content() assert TR.address_details__derivation_path in layout.screen_content()
# three xpub pages with the same testing logic
for _xpub_num in range(3):
self.debug.click(self.client.debug.screen_buttons.ok())
self.debug.click(self.debug.screen_buttons.menu()) self.debug.click(self.debug.screen_buttons.menu())
self.debug.synchronize_at("VerticalMenu") self.debug.synchronize_at("VerticalMenu")
# menu # menu
@ -868,6 +921,12 @@ class InputFlowShowXpubQRCode(InputFlowBase):
br = yield br = yield
layout = self.debug.read_layout() layout = self.debug.read_layout()
# In case of page overflow, paginete to the last page
# The last page is the confirm page
if br.pages > 2:
for _ in range(br.pages - 2):
self.debug.click(self.debug.screen_buttons.ok())
assert layout.subtitle() in (TR.address__public_key, "XPUB") assert layout.subtitle() in (TR.address__public_key, "XPUB")
self.debug.click(self.debug.screen_buttons.menu()) self.debug.click(self.debug.screen_buttons.menu())
@ -949,7 +1008,27 @@ class InputFlowPaymentRequestDetails(InputFlowBase):
self.debug.press_yes() self.debug.press_yes()
def input_flow_eckhart(self) -> BRGeneratorType: def input_flow_eckhart(self) -> BRGeneratorType:
assert False, "Not implemented" yield # request to see details
self.debug.read_layout()
self.debug.press_info()
yield # confirm first output
assert self.outputs[0].address[:16] in self.text_content() # type: ignore
self.debug.click(self.debug.screen_buttons.ok())
yield # confirm first output
self.debug.read_layout()
self.debug.click(self.debug.screen_buttons.ok())
yield # confirm second output
assert self.outputs[1].address[:16] in self.text_content() # type: ignore
self.debug.click(self.debug.screen_buttons.ok())
yield # confirm second output
self.debug.read_layout()
self.debug.click(self.debug.screen_buttons.ok())
yield # confirm transaction
self.debug.click(self.debug.screen_buttons.ok())
self.debug.press_yes()
class InputFlowSignTxHighFee(InputFlowBase): class InputFlowSignTxHighFee(InputFlowBase):
@ -1462,14 +1541,11 @@ class InputFlowEIP712ShowMore(InputFlowBase):
def _confirm_show_more(self) -> None: def _confirm_show_more(self) -> None:
"""Model-specific, either clicks a screen or presses a button.""" """Model-specific, either clicks a screen or presses a button."""
if self.client.layout_type in ( if self.client.layout_type is LayoutType.Bolt:
LayoutType.Bolt,
LayoutType.Eckhart,
):
self.debug.click(self.SHOW_MORE) self.debug.click(self.SHOW_MORE)
elif self.client.layout_type is LayoutType.Caesar: elif self.client.layout_type is LayoutType.Caesar:
self.debug.press_right() self.debug.press_right()
elif self.client.layout_type is LayoutType.Delizia: elif self.client.layout_type in (LayoutType.Delizia, LayoutType.Eckhart):
self.debug.click(self.debug.screen_buttons.menu()) self.debug.click(self.debug.screen_buttons.menu())
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[0]) self.debug.click(self.debug.screen_buttons.vertical_menu_items()[0])
else: else:

View File

@ -402,7 +402,12 @@ class EthereumFlow:
def confirm_data(self, info: bool = False, cancel: bool = False) -> BRGeneratorType: def confirm_data(self, info: bool = False, cancel: bool = False) -> BRGeneratorType:
assert (yield).name == "confirm_data" assert (yield).name == "confirm_data"
assert TR.ethereum__title_input_data in self.debug.read_layout().title() if self.client.layout_type is LayoutType.Eckhart:
TR.regexp("ethereum__title_all_input_data_template").fullmatch(
self.debug.read_layout().title().strip()
)
else:
assert TR.ethereum__title_input_data in self.debug.read_layout().title()
if info: if info:
self.debug.press_info() self.debug.press_info()
elif cancel: elif cancel:
@ -414,7 +419,12 @@ class EthereumFlow:
br = yield br = yield
assert br.name == "confirm_data" assert br.name == "confirm_data"
assert br.pages is not None assert br.pages is not None
assert TR.ethereum__title_input_data in self.debug.read_layout().title() if self.client.layout_type is LayoutType.Eckhart:
TR.regexp("ethereum__title_all_input_data_template").fullmatch(
self.debug.read_layout().title().strip()
)
else:
assert TR.ethereum__title_input_data in self.debug.read_layout().title()
for _ in range(br.pages - 1): for _ in range(br.pages - 1):
self.debug.read_layout() self.debug.read_layout()
go_next(self.debug) go_next(self.debug)
@ -425,13 +435,21 @@ class EthereumFlow:
elif self.client.layout_type is LayoutType.Delizia: elif self.client.layout_type is LayoutType.Delizia:
self.debug.read_layout() self.debug.read_layout()
self.debug.click(self.debug.screen_buttons.tap_to_confirm()) self.debug.click(self.debug.screen_buttons.tap_to_confirm())
elif self.client.layout_type is LayoutType.Eckhart:
self.debug.read_layout()
self.debug.click(self.debug.screen_buttons.ok())
def paginate_data_go_back(self) -> BRGeneratorType: def paginate_data_go_back(self) -> BRGeneratorType:
br = yield br = yield
assert br.name == "confirm_data" assert br.name == "confirm_data"
assert br.pages is not None assert br.pages is not None
assert br.pages > 2 assert br.pages > 2
assert TR.ethereum__title_input_data in self.debug.read_layout().title() if self.client.layout_type is LayoutType.Eckhart:
TR.regexp("ethereum__title_all_input_data_template").fullmatch(
self.debug.read_layout().title().strip()
)
else:
assert TR.ethereum__title_input_data in self.debug.read_layout().title()
if self.client.layout_type is LayoutType.Bolt: if self.client.layout_type is LayoutType.Bolt:
self.debug.swipe_up() self.debug.swipe_up()
self.debug.swipe_up() self.debug.swipe_up()
@ -448,6 +466,13 @@ class EthereumFlow:
self.debug.swipe_up() self.debug.swipe_up()
# Close the menu wuth the cross button # Close the menu wuth the cross button
self.debug.click(self.debug.screen_buttons.menu()) self.debug.click(self.debug.screen_buttons.menu())
elif self.client.layout_type is LayoutType.Eckhart:
# Scroll to the last page
for _ in range(br.pages - 1):
self.debug.click(self.debug.screen_buttons.ok())
# Go back to the first page and then cancel
for _ in range(br.pages):
self.debug.click(self.debug.screen_buttons.cancel())
else: else:
raise ValueError(f"Unknown layout: {self.client.layout_type}") raise ValueError(f"Unknown layout: {self.client.layout_type}")
@ -554,6 +579,54 @@ class EthereumFlow:
self.debug.click(self.debug.screen_buttons.tap_to_confirm()) self.debug.click(self.debug.screen_buttons.tap_to_confirm())
assert (yield).name == "confirm_ethereum_tx" assert (yield).name == "confirm_ethereum_tx"
def _confirm_tx_eckhart(
self, cancel: bool, info: bool, go_back_from_summary: bool
) -> BRGeneratorType:
assert (yield).name == "confirm_output"
title_exp = (
TR.words__send
if self.client.layout_type is LayoutType.Eckhart
else TR.words__address
)
assert title_exp in self.debug.read_layout().title()
if cancel:
self.debug.press_no()
return
self.debug.click(self.debug.screen_buttons.ok())
assert (yield).name == "confirm_total"
layout = self.debug.read_layout()
title_exp = (
TR.words__send
if self.client.layout_type is LayoutType.Eckhart
else TR.words__title_summary
)
assert layout.title() == title_exp
assert TR.send__maximum_fee in layout.text_content()
if go_back_from_summary:
# Get back to the address screen
self.debug.click(self.debug.screen_buttons.cancel())
title = self.debug.read_layout().title()
assert title_exp in title
# Get back to the summary screen
self.debug.click(self.debug.screen_buttons.ok())
layout = self.debug.read_layout()
assert layout.title() == title_exp
assert TR.send__maximum_fee in layout.text_content()
if info:
self.debug.click(self.debug.screen_buttons.menu())
self.debug.synchronize_at("VerticalMenu")
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[0])
text = self.debug.read_layout().text_content()
assert TR.ethereum__gas_limit in text
assert TR.ethereum__gas_price in text
self.debug.click(self.debug.screen_buttons.menu())
self.debug.click(self.debug.screen_buttons.menu())
self.debug.click(self.debug.screen_buttons.ok())
self.debug.read_layout()
assert (yield).name == "confirm_ethereum_tx"
def confirm_tx( def confirm_tx(
self, self,
cancel: bool = False, cancel: bool = False,
@ -566,6 +639,8 @@ class EthereumFlow:
yield from self._confirm_tx_caesar(cancel, info, go_back_from_summary) yield from self._confirm_tx_caesar(cancel, info, go_back_from_summary)
elif self.client.layout_type is LayoutType.Delizia: elif self.client.layout_type is LayoutType.Delizia:
yield from self._confirm_tx_delizia(cancel, info, go_back_from_summary) yield from self._confirm_tx_delizia(cancel, info, go_back_from_summary)
elif self.client.layout_type is LayoutType.Eckhart:
yield from self._confirm_tx_eckhart(cancel, info, go_back_from_summary)
else: else:
raise ValueError("Unknown model!") raise ValueError("Unknown model!")
@ -668,5 +743,35 @@ class EthereumFlow:
self.debug.press_yes() self.debug.press_yes()
elif self.client.layout_type is LayoutType.Eckhart:
# confirm intro
if info:
self.debug.click(self.debug.screen_buttons.menu())
self.debug.synchronize_at("VerticalMenu")
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[0])
assert self.debug.read_layout().title() in (
TR.ethereum__staking_stake_address,
TR.ethereum__staking_claim_address,
)
self.debug.click(self.debug.screen_buttons.menu())
self.debug.click(self.debug.screen_buttons.menu())
self.debug.click(self.debug.screen_buttons.ok())
br = yield
assert br.code == B.SignTx
assert br.name == "confirm_total"
# confirm summary
if info:
self.debug.click(self.debug.screen_buttons.menu())
self.debug.synchronize_at("VerticalMenu")
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[0])
assert TR.ethereum__gas_limit in self.debug.read_layout().text_content()
assert TR.ethereum__gas_price in self.debug.read_layout().text_content()
self.debug.click(self.debug.screen_buttons.menu())
self.debug.click(self.debug.screen_buttons.menu())
self.debug.press_yes()
else: else:
raise ValueError("Unknown model!") raise ValueError("Unknown model!")

File diff suppressed because it is too large Load Diff