fix(core): fixed coderabbit issues [no changelog]
What changed, and why it matters
This commit makes two tiny UI code cleanups: it removes an unnecessary colon from a transaction summary label and adjusts a Python type-hint return type. There is no indication these changes fix a security issue or affect how funds or secrets are handled.
No security action required; treat as a routine UI/type-hint cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff contains two non-functional changes in Trezor’s core UI layout code. In core/src/trezor/ui/layouts/bolt/__init__.py, the label passed to _confirm_summary is changed from with_colon(TR.words__amount) to TR.words__amount when a native amount is present, likely because the summary screen already appends a colon. In core/src/trezor/ui/layouts/properties.py, an overloaded type-hint for maybe_with_colon is narrowed from list[StrPropertyType] to Iterable[StrPropertyType]. Neither change alters cryptographic, authorization, or input-validation logic.
Changed components
core/src/trezor/ui/layouts/bolt/__init__.pycore/src/trezor/ui/layouts/properties.pyInspect captured patch +2 / −2
diff --git a/core/src/trezor/ui/layouts/bolt/__init__.py b/core/src/trezor/ui/layouts/bolt/__init__.py
index 3357d934..954280c5 100644
--- a/core/src/trezor/ui/layouts/bolt/__init__.py
+++ b/core/src/trezor/ui/layouts/bolt/__init__.py
@@ -1283,7 +1283,7 @@ if not utils.BITCOIN_ONLY:
await _confirm_summary(
native_amount,
- with_colon(TR.words__amount) if native_amount else None,
+ TR.words__amount if native_amount else None,
maximum_fee,
TR.send__maximum_fee,
TR.words__title_summary,
diff --git a/core/src/trezor/ui/layouts/properties.py b/core/src/trezor/ui/layouts/properties.py
index 116f7f09..c923b140 100644
--- a/core/src/trezor/ui/layouts/properties.py
+++ b/core/src/trezor/ui/layouts/properties.py
@@ -17,7 +17,7 @@ if TYPE_CHECKING:
@overload
def maybe_with_colon(
properties: Iterable[StrPropertyType],
- ) -> list[StrPropertyType]: ...
+ ) -> Iterable[StrPropertyType]: ...
@overload
def maybe_with_colon(properties: str) -> str: ...
@overload
Why this scored 12/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.