Skip to content

Commit

Permalink
fixup! feat(core/ethereum): new ETH contract flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ibz committed Oct 28, 2024
1 parent fb244f0 commit 9767fa2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tests/device_tests/ethereum/test_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ def test_external_token(client: Client) -> None:

def test_external_chain_without_token(client: Client) -> None:
with client:
client.set_input_flow(InputFlowConfirmAllWarnings(client).get())
if not client.debug.legacy_debug:
client.set_input_flow(InputFlowConfirmAllWarnings(client).get())
# when using an external chains, unknown tokens are allowed
network = common.encode_network(chain_id=66666, slip44=60)
params = DEFAULT_ERC20_PARAMS.copy()
Expand All @@ -145,7 +146,8 @@ def test_external_chain_token_ok(client: Client) -> None:

def test_external_chain_token_mismatch(client: Client) -> None:
with client:
client.set_input_flow(InputFlowConfirmAllWarnings(client).get())
if not client.debug.legacy_debug:
client.set_input_flow(InputFlowConfirmAllWarnings(client).get())
# when providing external defs, we explicitly allow, but not use, tokens
# from other chains
network = common.encode_network(chain_id=66666, slip44=60)
Expand Down
9 changes: 7 additions & 2 deletions tests/device_tests/ethereum/test_signtx.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ def make_defs(parameters: dict) -> messages.EthereumDefinitions:
)
@pytest.mark.parametrize("chunkify", (True, False))
def test_signtx(client: Client, chunkify: bool, parameters: dict, result: dict):
input_flow = InputFlowConfirmAllWarnings(client).get()
input_flow = (
InputFlowConfirmAllWarnings(client).get()
if not client.debug.legacy_debug
else None
)
_do_test_signtx(client, parameters, result, input_flow, chunkify=chunkify)


Expand Down Expand Up @@ -145,7 +149,8 @@ def test_signtx_go_back_from_summary(client: Client):
@pytest.mark.parametrize("chunkify", (True, False))
def test_signtx_eip1559(client: Client, chunkify: bool, parameters: dict, result: dict):
with client:
client.set_input_flow(InputFlowConfirmAllWarnings(client).get())
if not client.debug.legacy_debug:
client.set_input_flow(InputFlowConfirmAllWarnings(client).get())
sig_v, sig_r, sig_s = ethereum.sign_tx_eip1559(
client,
n=parse_path(parameters["path"]),
Expand Down

0 comments on commit 9767fa2

Please sign in to comment.