refactor(core/ui): require the amount and the asset in confirm_stellar_output.
What changed, and why it matters
This change tightens a Stellar cryptocurrency confirmation screen so the amount and asset can no longer be left blank. Previously, the code allowed them to be optional and would silently skip showing the amount if either was missing, which could let a user approve a payment without seeing how much was being sent. The commit makes both values mandatory and always displays them. It is described as a defensive refactor, not a fix for an active bug or reported vulnerability.
Treat as a low-risk defensive improvement. Review callers of `confirm_stellar_output` to confirm they always supply amount and asset, and verify no Stellar operation type can reach this function without those fields. No urgent patch or incident response is indicated.
Security signals we found
Defensive hardening of UI confirmation flow
Removal of silent skip path that could omit amount display
Type narrowing to prevent accidental omission of amount/asset
No changelog entry, suggesting minor/internal refactor
Evidence from the diff
The commit refactors confirm_stellar_output across four Trezor Core UI layout implementations (bolt, caesar, delizia, eckhart). It changes the amount and asset parameters from optional (str | None, StellarAsset | None) to required (str, StellarAsset) and removes the conditional if amount is not None and asset is not None: guard that previously skipped calling confirm_stellar_output_amount. The amount/asset confirmation is now unconditional. The commit message notes the guard would have silently shown a recipient with no amount if omitted.
Changed components
core/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__.pyStellar transaction confirmation UIInspect captured patch +40 / −44
### core/src/trezor/ui/layouts/bolt/__init__.py
@@ -1824,9 +1824,9 @@ async def confirm_stellar_output_amount(
async def confirm_stellar_output(
address: str,
- amount: str | None,
+ amount: str,
output_index: int,
- asset: StellarAsset | None,
+ asset: StellarAsset,
address_description: str | None = None,
amount_description: str | None = None,
token_contract: str | None = None,
@@ -1840,15 +1840,14 @@ async def confirm_stellar_output(
verb=TR.buttons__continue,
)
- if amount is not None and asset is not None:
- await confirm_stellar_output_amount(
- title=TR.words__send,
- subtitle=f"{TR.words__recipient} #{output_index + 1}",
- amount=amount,
- asset=asset,
- description=amount_description or TR.words__amount,
- token_contract=token_contract,
- )
+ await confirm_stellar_output_amount(
+ title=TR.words__send,
+ subtitle=f"{TR.words__recipient} #{output_index + 1}",
+ amount=amount,
+ asset=asset,
+ description=amount_description or TR.words__amount,
+ token_contract=token_contract,
+ )
async def confirm_tron_claim(
title: str,
### core/src/trezor/ui/layouts/caesar/__init__.py
@@ -1911,9 +1911,9 @@ async def confirm_stellar_output_amount(
async def confirm_stellar_output(
address: str,
- amount: str | None,
+ amount: str,
output_index: int,
- asset: StellarAsset | None,
+ asset: StellarAsset,
address_description: str | None = None,
amount_description: str | None = None,
token_contract: str | None = None,
@@ -1927,15 +1927,14 @@ async def confirm_stellar_output(
verb=TR.buttons__continue,
)
- if amount is not None and asset is not None:
- await confirm_stellar_output_amount(
- title=f"{TR.words__send} #{output_index + 1}",
- subtitle="",
- amount=amount,
- asset=asset,
- description=amount_description or TR.words__amount,
- token_contract=token_contract,
- )
+ await confirm_stellar_output_amount(
+ title=f"{TR.words__send} #{output_index + 1}",
+ subtitle="",
+ amount=amount,
+ asset=asset,
+ description=amount_description or TR.words__amount,
+ token_contract=token_contract,
+ )
async def confirm_tron_claim(
title: str,
### core/src/trezor/ui/layouts/delizia/__init__.py
@@ -1843,9 +1843,9 @@ async def confirm_stellar_output_amount(
async def confirm_stellar_output(
address: str,
- amount: str | None,
+ amount: str,
output_index: int,
- asset: StellarAsset | None,
+ asset: StellarAsset,
address_description: str | None = None,
amount_description: str | None = None,
token_contract: str | None = None,
@@ -1861,15 +1861,14 @@ async def confirm_stellar_output(
verb=TR.buttons__continue,
)
- if amount is not None and asset is not None:
- await confirm_stellar_output_amount(
- title=TR.words__send,
- subtitle=subtitle,
- amount=amount,
- asset=asset,
- description=amount_description or TR.words__amount,
- token_contract=token_contract,
- )
+ await confirm_stellar_output_amount(
+ title=TR.words__send,
+ subtitle=subtitle,
+ amount=amount,
+ asset=asset,
+ description=amount_description or TR.words__amount,
+ token_contract=token_contract,
+ )
async def confirm_tron_claim(
title: str,
### core/src/trezor/ui/layouts/eckhart/__init__.py
@@ -1948,9 +1948,9 @@ async def confirm_stellar_output_amount(
async def confirm_stellar_output(
address: str,
- amount: str | None,
+ amount: str,
output_index: int,
- asset: StellarAsset | None,
+ asset: StellarAsset,
address_description: str | None = None,
amount_description: str | None = None,
token_contract: str | None = None,
@@ -1967,15 +1967,14 @@ async def confirm_stellar_output(
verb=TR.buttons__continue,
)
- if amount is not None and asset is not None:
- await confirm_stellar_output_amount(
- title=TR.words__send,
- subtitle=subtitle,
- amount=amount,
- asset=asset,
- description=amount_description or TR.words__amount,
- token_contract=token_contract,
- )
+ await confirm_stellar_output_amount(
+ title=TR.words__send,
+ subtitle=subtitle,
+ amount=amount,
+ asset=asset,
+ description=amount_description or TR.words__amount,
+ token_contract=token_contract,
+ )
async def confirm_tron_claim(
title: str,Why this scored 27/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.