fix(clear_signing): unknown token label improvement.
What changed, and why it matters
This commit is a small user-interface wording change for Trezor's Ethereum 'clear signing' feature. When the device cannot identify a token involved in a transaction, it now labels the displayed contract address as 'Address (unknown token)' instead of 'Token contract'. There is no code change that alters security checks, transaction validation, or what data is shown to the user—only the label text is clearer. A couple of minor code-style and comment cleanups are also included.
No security action required; treat as a routine UX improvement.
Security signals we found
No security-relevant logic changed
UI label clarification only
No validation, parsing, or cryptographic code modified
Evidence from the diff
The diff modifies core/src/apps/ethereum/clear_signing.py. It removes an extra space in a class constant comment, adds two explanatory comments about conditional visibility around the From path lookup, and changes the label string used when an ERC-20-like token is unknown. Previously the property was titled TR.ethereum__token_contract; it is now f”{TR.words__address} ({TR.ethereum__unknown_token})”. The underlying value displayed (the token contract address) and the surrounding flow logic remain unchanged.
Changed components
core/src/apps/ethereum/clear_signing.pyEthereum clear-signing UI label for unknown tokensInspect captured patch +4 / −2
### core/src/apps/ethereum/clear_signing.py
@@ -871,7 +871,7 @@ class ContainerPath:
From = 1
Value = 2
To = 3
- ChainId = 4 # TODO
+ ChainId = 4 # TODO
class FieldDefinition:
@@ -1088,6 +1088,8 @@ def get_value_for_path(path: Path) -> AnyValue:
# risking a confidently wrong display.
raise InvalidFormatDefinition
if path == ContainerPath.From:
+ # Conditional visibility check not required.
+ # Sending account label is fine.
account, _ = get_account_and_path(msg.address_n)
return account
elif path == ContainerPath.Value:
@@ -1631,7 +1633,7 @@ async def _handle_generic_ui(
if actual_token is tokens.UNKNOWN_TOKEN and actual_token_address is not None:
token_address_str = address_from_bytes(actual_token_address, defs.network)
token_address_property: StrPropertyType = (
- TR.ethereum__token_contract,
+ f"{TR.words__address} ({TR.ethereum__unknown_token})",
token_address_str,
None,
)Why this scored 19/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.