fix(core): use with_colon instead of += ":" in for descriptions
What changed, and why it matters
This commit is a small UI cleanup in Trezor's firmware. It replaces several places where a colon was manually added to on-screen text descriptions with a helper function called with_colon(). The change only affects two visual themes (Bolt and Caesar). It is not a security fix and does not change how funds, keys, or transactions are protected.
No security action required. Treat as a normal code-quality/UI consistency change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch changes string concatenation (description += ‘:’ or hardcoded ‘:’) to a with_colon() utility in confirm_blob, confirm_value, confirm_text, and confirm_stellar_tx flows within the Bolt and Caesar UI layouts. The previous code added a colon only if one was not already present; the new code always normalizes via with_colon(). There is no cryptographic, authorization, or parsing change. The only functional risk is a minor localization/formatting difference in how labels are displayed.
Changed components
core/src/trezor/ui/layouts/bolt/__init__.pycore/src/trezor/ui/layouts/caesar/__init__.pyInspect captured patch +8 / −8
### core/src/trezor/ui/layouts/bolt/__init__.py
@@ -752,8 +752,8 @@ async def confirm_blob(
chunkify: bool = False,
prompt_screen: bool = True,
) -> None:
- if description and ":" not in description:
- description += ":"
+ if description:
+ description = with_colon(description)
verb = verb or TR.buttons__confirm # def_arg
with trezorui_api.confirm_value(
@@ -869,7 +869,7 @@ async def confirm_value(
"""General confirmation dialog, used by many other confirm_* functions."""
if description and value:
- description += ":"
+ description = with_colon(description)
info_ctx = trezorui_api.show_info_with_cancel(
title=info_title if info_title else TR.words__title_information,
### core/src/trezor/ui/layouts/caesar/__init__.py
@@ -777,8 +777,8 @@ async def confirm_blob(
chunkify: bool = False,
prompt_screen: bool = True,
) -> None:
- if description and ":" not in description:
- description += ":"
+ if description:
+ description = with_colon(description)
with trezorui_api.confirm_value(
title=title,
@@ -883,7 +883,7 @@ def confirm_text(
br_code: ButtonRequestType = BR_CODE_OTHER,
) -> Awaitable[None]:
if description and data:
- description += ":"
+ description = with_colon(description)
return _placeholder_confirm(
br_name,
@@ -967,7 +967,7 @@ async def confirm_value(
"""General confirmation dialog, used by many other confirm_* functions."""
if description and value:
- description += ":"
+ description = with_colon(description)
if not info_items:
with trezorui_api.confirm_value(
@@ -1822,7 +1822,7 @@ async def confirm_stellar_tx(
amount=None,
amount_label=None,
fee=fee,
- fee_label=TR.send__maximum_fee,
+ fee_label=with_colon(TR.send__maximum_fee),
account_items=with_colon(
(
(TR.words__account, account_name, None),Why this scored 16/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.