1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-05-30 20:58:46 +00:00

fix(core): fix br_code inconsistency in sign-tx

[no changelog]
This commit is contained in:
Ioan Bizău 2025-02-11 15:14:33 +01:00 committed by Ioan Bizău
parent c8210056da
commit b8e2709ca8
4 changed files with 5 additions and 11 deletions

View File

@ -864,9 +864,7 @@ if not utils.BITCOIN_ONLY:
) )
while True: while True:
await with_info( await with_info(address_layout, account_info_layout, br_name, br_code)
address_layout, account_info_layout, br_name, ButtonRequestType.Other
)
try: try:
await with_info(total_layout, fee_info_layout, br_name, br_code) await with_info(total_layout, fee_info_layout, br_name, br_code)

View File

@ -982,6 +982,7 @@ if not utils.BITCOIN_ONLY:
title, title,
recipient or TR.ethereum__new_contract, recipient or TR.ethereum__new_contract,
verb=TR.buttons__continue, verb=TR.buttons__continue,
br_code=br_code,
chunkify=(chunkify if recipient else False), chunkify=(chunkify if recipient else False),
) )

View File

@ -778,7 +778,7 @@ if not utils.BITCOIN_ONLY:
account_path=account_path, account_path=account_path,
address=None, address=None,
address_title=None, address_title=None,
br_code=ButtonRequestType.Other, br_code=ButtonRequestType.SignTx,
br_name="confirm_output", br_name="confirm_output",
summary_items=( summary_items=(
(TR.words__amount, total_amount), (TR.words__amount, total_amount),

View File

@ -16,7 +16,7 @@
import pytest import pytest
from trezorlib import ethereum, exceptions, messages, models from trezorlib import ethereum, exceptions, messages
from trezorlib.debuglink import TrezorClientDebugLink as Client from trezorlib.debuglink import TrezorClientDebugLink as Client
from trezorlib.debuglink import message_filters from trezorlib.debuglink import message_filters
from trezorlib.exceptions import TrezorFailure from trezorlib.exceptions import TrezorFailure
@ -220,15 +220,10 @@ def test_data_streaming(client: Client):
checked in vectorized function above. checked in vectorized function above.
""" """
with client: with client:
is_t1 = client.model is models.T1B1
client.set_expected_responses( client.set_expected_responses(
[ [
messages.ButtonRequest(code=messages.ButtonRequestType.SignTx), messages.ButtonRequest(code=messages.ButtonRequestType.SignTx),
(is_t1, messages.ButtonRequest(code=messages.ButtonRequestType.SignTx)), messages.ButtonRequest(code=messages.ButtonRequestType.SignTx),
(
not is_t1,
messages.ButtonRequest(code=messages.ButtonRequestType.Other),
),
messages.ButtonRequest(code=messages.ButtonRequestType.SignTx), messages.ButtonRequest(code=messages.ButtonRequestType.SignTx),
message_filters.EthereumTxRequest( message_filters.EthereumTxRequest(
data_length=1_024, data_length=1_024,