chore(core): remove unnecessary function
What changed, and why it matters
This commit is a routine cleanup: it removes a small helper function called ethereum_address_title() that was defined separately in four different user-interface layout files and replaces its one remaining use with a direct translation string. The visible text shown to users does not change in any meaningful security-relevant way; the change only makes the code simpler and more consistent across device designs.
No security action needed. Treat as normal refactoring/UI consistency change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch deletes the ethereum_address_title() helper from bolt, caesar, delizia, and eckhart layout modules. In bolt/caesar/delizia it returned TR.words__address; in eckhart it returned TR.words__send. The only caller was in apps/ethereum/layout.py, where it was used as the title when confirming an unknown token. That caller now uses TR.words__send directly, matching the eckhart behavior and unifying the title across layouts. tests/ui_tests/fixtures.json is updated, which is expected for any UI text change.
Changed components
core/src/apps/ethereum/layout.pycore/src/trezor/ui/layouts/bolt/__init__.pycore/src/trezor/ui/layouts/caesar/__init__.pycore/src/trezor/ui/layouts/delizia/__init__.pycore/src/trezor/ui/layouts/eckhart/__init__.pytests/ui_tests/fixtures.jsonInspect captured patch +142 / −158
### core/src/apps/ethereum/layout.py
@@ -111,14 +111,14 @@ async def require_confirm_tx(
chunkify: bool,
native_amount: str | None = None,
) -> None:
- from trezor.ui.layouts import confirm_ethereum_tx, ethereum_address_title
+ from trezor.ui.layouts import confirm_ethereum_tx
from . import tokens
account, account_path = get_account_and_path(address_n)
if token is tokens.UNKNOWN_TOKEN:
- title = ethereum_address_title()
+ title = TR.words__send
await require_confirm_unknown_token(title)
await require_confirm_address(
address_bytes,
### core/src/trezor/ui/layouts/bolt/__init__.py
@@ -1156,10 +1156,6 @@ async def confirm_ethereum_tx(
else:
break
- def ethereum_address_title() -> str:
- """Return the title for the Ethereum address confirmation."""
- return TR.words__address
-
async def confirm_ethereum_approve(
recipient_addr: str,
recipient_str: str | None,
### core/src/trezor/ui/layouts/caesar/__init__.py
@@ -1125,10 +1125,6 @@ def confirm_ethereum_unknown_contract_warning(
title=TR.ethereum__unknown_contract_address,
)
- def ethereum_address_title() -> str:
- """Return the title for the Ethereum address confirmation."""
- return TR.words__address
-
async def confirm_ethereum_approve(
recipient_addr: str,
recipient_str: str | None,
### core/src/trezor/ui/layouts/delizia/__init__.py
@@ -1118,10 +1118,6 @@ async def confirm_ethereum_tx(
),
)
- def ethereum_address_title() -> str:
- """Return the title for the Ethereum address confirmation."""
- return TR.words__address
-
async def confirm_ethereum_approve(
recipient_addr: str,
recipient_str: str | None,
### core/src/trezor/ui/layouts/eckhart/__init__.py
@@ -1162,10 +1162,6 @@ async def _step2() -> trezorui_api.UiResult:
await confirm_linear_flow(_step1, _step2)
- def ethereum_address_title() -> str:
- """Return the title for the Ethereum address confirmation."""
- return TR.words__send
-
async def confirm_ethereum_approve(
recipient_addr: str,
recipient_str: str | None,
### tests/ui_tests/fixtures.json
[binary or diff unavailable]Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.