What changed, and why it matters
This commit is a minor user-interface cleanup. It removes a fallback English string ('Path ...') that was not part of the device's translation system and instead reuses an already-translated derivation-path label. It also stops the wallet from showing the same account information twice on screen when no proper account name is available. There is no security issue here.
No security action required. Treat as a normal UI/translation cleanup commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change refactors account_label() in bitcoin/sign_tx/layout.py so that, when address_n_to_name() returns None, it returns address_n_to_str(address_n) directly rather than wrapping it in an untranslatable f-string ‘Path {path}’. The two UI layout files (delizia and eckhart) are updated to avoid adding a duplicate derivation-path property when source_account_path equals source_account, with a comment explaining that account_label() can fall back to the path string. This is purely a localization/consistency improvement.
Changed components
core/src/apps/bitcoin/sign_tx/layout.pycore/src/trezor/ui/layouts/delizia/__init__.pycore/src/trezor/ui/layouts/eckhart/__init__.pyInspect captured patch +12 / −8
diff --git a/core/src/apps/bitcoin/sign_tx/layout.py b/core/src/apps/bitcoin/sign_tx/layout.py
index 33332d0d..a4640709 100644
--- a/core/src/apps/bitcoin/sign_tx/layout.py
+++ b/core/src/apps/bitcoin/sign_tx/layout.py
@@ -50,12 +50,12 @@ def format_coin_amount(amount: int, coin: CoinInfo, amount_unit: AmountUnit) ->
def account_label(coin: CoinInfo, address_n: Bip32Path | None) -> str:
- return (
- TR.bitcoin__multiple_accounts
- if address_n is None
- else address_n_to_name(coin, list(address_n) + [0] * BIP32_WALLET_DEPTH)
- or f"Path {address_n_to_str(address_n)}"
- )
+ if address_n is None:
+ return TR.bitcoin__multiple_accounts
+ else:
+ return address_n_to_name(
+ coin, list(address_n) + [0] * BIP32_WALLET_DEPTH
+ ) or address_n_to_str(address_n)
async def confirm_output(
diff --git a/core/src/trezor/ui/layouts/delizia/__init__.py b/core/src/trezor/ui/layouts/delizia/__init__.py
index 6305223d..6d7e7aff 100644
--- a/core/src/trezor/ui/layouts/delizia/__init__.py
+++ b/core/src/trezor/ui/layouts/delizia/__init__.py
@@ -603,7 +603,9 @@ async def confirm_output(
account_properties: list[StrPropertyType] = []
if source_account:
account_properties.append((TR.words__account, source_account, None))
- if source_account_path:
+ if source_account_path and source_account_path != source_account:
+ # the reason for this check is account_label in bitcoin/sign_tx/layout.py
+ # which can return the derivation path instead of the account
account_properties.append(
(
TR.address_details__derivation_path,
diff --git a/core/src/trezor/ui/layouts/eckhart/__init__.py b/core/src/trezor/ui/layouts/eckhart/__init__.py
index d122ac14..c26e07ba 100644
--- a/core/src/trezor/ui/layouts/eckhart/__init__.py
+++ b/core/src/trezor/ui/layouts/eckhart/__init__.py
@@ -597,7 +597,9 @@ async def confirm_output(
account_properties: list[StrPropertyType] = []
if source_account:
account_properties.append((TR.words__wallet, source_account, None))
- if source_account_path:
+ if source_account_path and source_account_path != source_account:
+ # the reason for this check is account_label in bitcoin/sign_tx/layout.py
+ # which can return the derivation path instead of the account
account_properties.append(
(
TR.address_details__derivation_path,
Why this scored 15/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.