mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-25 09:22:33 +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)
|
# arg0: address, Address, 20 bytes (left padded with zeroes)
|
||||||
# arg1: value, uint256, 32 bytes
|
# 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
|
return token, token_address, None, recipient, value
|
||||||
arg0 = data_reader.read_memoryview(SC_ARGUMENT_BYTES)
|
arg0 = data_reader.read_memoryview(SC_ARGUMENT_BYTES)
|
||||||
assert all(
|
assert all(
|
||||||
|
@ -19,6 +19,8 @@ CONFIRMED = trezorui_api.CONFIRMED
|
|||||||
CANCELLED = trezorui_api.CANCELLED
|
CANCELLED = trezorui_api.CANCELLED
|
||||||
INFO = trezorui_api.INFO
|
INFO = trezorui_api.INFO
|
||||||
|
|
||||||
|
DOWN_ARROW = "V"
|
||||||
|
|
||||||
|
|
||||||
def confirm_action(
|
def confirm_action(
|
||||||
br_name: str,
|
br_name: str,
|
||||||
@ -552,7 +554,7 @@ async def _confirm_ask_pagination(
|
|||||||
[(description, False), (data, True)],
|
[(description, False), (data, True)],
|
||||||
br_name=br_name,
|
br_name=br_name,
|
||||||
br_code=br_code,
|
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:
|
if extra_confirmation_if_not_read:
|
||||||
try:
|
try:
|
||||||
|
@ -17,6 +17,7 @@ CONFIRMED = trezorui_api.CONFIRMED
|
|||||||
CANCELLED = trezorui_api.CANCELLED
|
CANCELLED = trezorui_api.CANCELLED
|
||||||
INFO = trezorui_api.INFO
|
INFO = trezorui_api.INFO
|
||||||
|
|
||||||
|
DOWN_ARROW = "V"
|
||||||
BR_CODE_OTHER = ButtonRequestType.Other # global_import_cache
|
BR_CODE_OTHER = ButtonRequestType.Other # global_import_cache
|
||||||
|
|
||||||
|
|
||||||
@ -931,7 +932,7 @@ if not utils.BITCOIN_ONLY:
|
|||||||
TR.ethereum__token_contract + " | " + TR.words__address,
|
TR.ethereum__token_contract + " | " + TR.words__address,
|
||||||
token_address,
|
token_address,
|
||||||
None,
|
None,
|
||||||
verb="V",
|
verb=DOWN_ARROW,
|
||||||
hold=False,
|
hold=False,
|
||||||
br_name="confirm_ethereum_approve",
|
br_name="confirm_ethereum_approve",
|
||||||
chunkify=chunkify,
|
chunkify=chunkify,
|
||||||
@ -943,7 +944,7 @@ if not utils.BITCOIN_ONLY:
|
|||||||
TR.ethereum__approve_chain_id,
|
TR.ethereum__approve_chain_id,
|
||||||
chain_id,
|
chain_id,
|
||||||
None,
|
None,
|
||||||
verb="V",
|
verb=DOWN_ARROW,
|
||||||
hold=False,
|
hold=False,
|
||||||
br_name="confirm_ethereum_approve",
|
br_name="confirm_ethereum_approve",
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user