mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-25 01:18:54 +00:00
fix(core): address later comments on ETH approve flow
[no changelog]
This commit is contained in:
parent
807b2eccc4
commit
5a684cd5e3
@ -256,7 +256,7 @@ async def _handle_erc20(
|
||||
|
||||
# arg0: address, Address, 20 bytes (left padded with zeroes)
|
||||
# arg1: value, uint256, 32 bytes
|
||||
if data_reader.remaining_count() < SC_FUNC_SIG_BYTES * 2:
|
||||
if data_reader.remaining_count() < SC_ARGUMENT_BYTES * 2:
|
||||
return token, token_address, None, recipient, value
|
||||
arg0 = data_reader.read_memoryview(SC_ARGUMENT_BYTES)
|
||||
assert all(
|
||||
|
@ -19,6 +19,8 @@ CONFIRMED = trezorui_api.CONFIRMED
|
||||
CANCELLED = trezorui_api.CANCELLED
|
||||
INFO = trezorui_api.INFO
|
||||
|
||||
DOWN_ARROW = "V"
|
||||
|
||||
|
||||
def confirm_action(
|
||||
br_name: str,
|
||||
@ -552,7 +554,7 @@ async def _confirm_ask_pagination(
|
||||
[(description, False), (data, True)],
|
||||
br_name=br_name,
|
||||
br_code=br_code,
|
||||
confirm="V" if extra_confirmation_if_not_read else None,
|
||||
confirm=DOWN_ARROW if extra_confirmation_if_not_read else None,
|
||||
):
|
||||
if extra_confirmation_if_not_read:
|
||||
try:
|
||||
|
@ -17,6 +17,7 @@ CONFIRMED = trezorui_api.CONFIRMED
|
||||
CANCELLED = trezorui_api.CANCELLED
|
||||
INFO = trezorui_api.INFO
|
||||
|
||||
DOWN_ARROW = "V"
|
||||
BR_CODE_OTHER = ButtonRequestType.Other # global_import_cache
|
||||
|
||||
|
||||
@ -931,7 +932,7 @@ if not utils.BITCOIN_ONLY:
|
||||
TR.ethereum__token_contract + " | " + TR.words__address,
|
||||
token_address,
|
||||
None,
|
||||
verb="V",
|
||||
verb=DOWN_ARROW,
|
||||
hold=False,
|
||||
br_name="confirm_ethereum_approve",
|
||||
chunkify=chunkify,
|
||||
@ -943,7 +944,7 @@ if not utils.BITCOIN_ONLY:
|
||||
TR.ethereum__approve_chain_id,
|
||||
chain_id,
|
||||
None,
|
||||
verb="V",
|
||||
verb=DOWN_ARROW,
|
||||
hold=False,
|
||||
br_name="confirm_ethereum_approve",
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user