Skip to content

Commit

Permalink
fixup! feat(core): show account info in ETH send/stake flow
Browse files Browse the repository at this point in the history
  • Loading branch information
ibz committed Sep 23, 2024
1 parent 217fa7e commit 5b267d4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions core/src/apps/ethereum/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ def get_account_and_path(address_n: list[int]) -> tuple[str | None, str | None]:

from .keychain import PATTERNS_ADDRESS

if not address_n or len(address_n) < 2:
return (None, None)

slip44_id = address_n[1] # it depends on the network (ETH vs ETC...)
account = (
paths.get_account_name("ETH", address_n, PATTERNS_ADDRESS, slip44_id)
if address_n
else None
)
account_path = paths.address_n_to_str(address_n) if address_n is not None else None

account = paths.get_account_name("ETH", address_n, PATTERNS_ADDRESS, slip44_id)
account_path = paths.address_n_to_str(address_n)

return (account, account_path)

Expand Down
4 changes: 2 additions & 2 deletions core/src/trezor/ui/layouts/tr/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1270,8 +1270,8 @@ def confirm_solana_tx(
async def confirm_ethereum_tx(
recipient: str,
total_amount: str,
_account: str,
_account_path: str,
_account: str | None,
_account_path: str | None,
maximum_fee: str,
fee_info_items: Iterable[tuple[str, str]],
br_name: str = "confirm_ethereum_tx",
Expand Down
4 changes: 2 additions & 2 deletions core/src/trezor/ui/layouts/tt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,8 +1097,8 @@ def _confirm_summary(
async def confirm_ethereum_tx(
recipient: str,
total_amount: str,
_account: str,
_account_path: str,
_account: str | None,
_account_path: str | None,
maximum_fee: str,
fee_info_items: Iterable[tuple[str, str]],
br_name: str = "confirm_ethereum_tx",
Expand Down

0 comments on commit 5b267d4

Please sign in to comment.