What changed, and why it matters
This commit is a user-interface polish change for the Trezor hardware wallet. It introduces a helper that adds colons to on-screen labels only for certain visual themes (Bolt and Caesar), and updates Solana transaction confirmation screens to use it. There is no security-relevant behavior change.
No security action required. Treat as a normal UI/UX commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch adds maybe_with_colon() in core/src/trezor/ui/layouts/properties.py, which conditionally invokes the existing with_colon() helper when utils.UI_LAYOUT is ‘BOLT’ or ‘CAESAR’. It also tweaks with_colon() to use a non-breaking space before the colon for French (translations.get_language() == 'fr'). The Solana layout code is updated to call maybe_with_colon() instead of passing raw strings/tuples to confirm_properties(). No cryptographic, parsing, authorization, or memory-safety logic is modified.
Changed components
core/src/trezor/ui/layouts/properties.pycore/src/apps/solana/layout.pyInspect captured patch +32 / −7
diff --git a/core/src/apps/solana/layout.py b/core/src/apps/solana/layout.py
index 4798b6d1..ef3dfcc3 100644
--- a/core/src/apps/solana/layout.py
+++ b/core/src/apps/solana/layout.py
@@ -13,6 +13,7 @@ from trezor.ui.layouts import (
show_danger,
show_warning,
)
+from trezor.ui.layouts.properties import maybe_with_colon
from apps.common.paths import address_n_to_str
@@ -119,7 +120,7 @@ async def confirm_instruction(
f"{instruction_index}/{instructions_count}",
(
(
- ui_property.display_name,
+ maybe_with_colon(ui_property.display_name),
property_template.format(value, *args),
True,
),
@@ -160,7 +161,7 @@ async def confirm_instruction(
await confirm_properties(
"confirm_instruction",
f"{instruction_index}/{instructions_count}",
- account_data,
+ maybe_with_colon(account_data),
instruction.ui_name,
)
else:
@@ -189,7 +190,7 @@ async def confirm_instruction(
await confirm_properties(
"confirm_instruction",
f"{instruction_index}/{instructions_count}",
- signers,
+ maybe_with_colon(signers),
instruction.ui_name,
)
@@ -234,7 +235,7 @@ async def confirm_unsupported_instruction_details(
title,
(
(
- f"{TR.solana__instruction_data}",
+ maybe_with_colon(TR.solana__instruction_data),
bytes(instruction.instruction_data),
True,
),
@@ -267,7 +268,7 @@ async def confirm_unsupported_instruction_details(
await confirm_properties(
"accounts",
title,
- accounts,
+ maybe_with_colon(accounts),
)
diff --git a/core/src/trezor/ui/layouts/properties.py b/core/src/trezor/ui/layouts/properties.py
index f90b5d46..53ce25f4 100644
--- a/core/src/trezor/ui/layouts/properties.py
+++ b/core/src/trezor/ui/layouts/properties.py
@@ -1,5 +1,7 @@
from typing import TYPE_CHECKING
+from trezor import translations, utils
+
if TYPE_CHECKING:
from typing import Iterable, overload
@@ -12,6 +14,15 @@ if TYPE_CHECKING:
@overload
def with_colon(properties: str) -> str: ...
+ @overload
+ def maybe_with_colon(properties: None) -> None: ...
+ @overload
+ def maybe_with_colon(
+ properties: Iterable[StrPropertyType],
+ ) -> list[StrPropertyType]: ...
+ @overload
+ def maybe_with_colon(properties: str) -> str: ...
+
class AboveThreshold:
"""Signals that an amount exceeds a threshold.
@@ -29,10 +40,23 @@ def with_colon(
) -> list[StrPropertyType] | str | None:
if properties is None:
return None
+
+ NBSP = "\u00a0"
+ separator = f"{NBSP}:" if translations.get_language() == "fr" else ":"
if isinstance(properties, str):
if properties:
- return f"{properties}:"
+ return f"{properties}{separator}"
else:
return ""
- return [((p[0] + ":" if p[0] else p[0]),) + p[1:] for p in properties]
+ return [((p[0] + separator if p[0] else p[0]),) + p[1:] for p in properties]
+
+
+def maybe_with_colon(
+ properties: Iterable[StrPropertyType] | str | None = None,
+):
+ """Add a colon to the end of the first element of each property tuple if the UI layout should have colons"""
+ if utils.UI_LAYOUT in ("BOLT", "CAESAR"):
+ return with_colon(properties)
+ else:
+ return properties
Why this scored 18/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.