Light reorg and simplification of `PSBTChangeDetailsScreen`
What changed, and why it matters
This commit is a minor UI cleanup for a screen that shows details about a Bitcoin change address. It reorders on-screen elements, changes some label text (for example from 'Change' to 'change address'), and adjusts how a success message is centered. There is no security-relevant change.
No security action needed; this is a cosmetic refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch refactors PSBTChangeDetailsScreen rendering in src/seedsigner/gui/screens/psbt_screens.py. It swaps the order of the address type/index label and the FormattedAddress component, replaces an IconTextLine with a centered TextArea for the type/index label, and uses available vertical space to center the ‘Address verified!’ IconTextLine. No logic, validation, cryptography, or data-handling code is modified.
Changed components
src/seedsigner/gui/screens/psbt_screens.pyInspect captured patch +27 / −20
diff --git a/src/seedsigner/gui/screens/psbt_screens.py b/src/seedsigner/gui/screens/psbt_screens.py
index 4a65555..38df6b8 100644
--- a/src/seedsigner/gui/screens/psbt_screens.py
+++ b/src/seedsigner/gui/screens/psbt_screens.py
@@ -668,40 +668,47 @@ class PSBTChangeDetailsScreen(ButtonListScreen):
screen_y=self.top_nav.height + GUIConstants.COMPONENT_PADDING,
))
- self.components.append(FormattedAddress(
- screen_y=self.components[-1].screen_y + self.components[-1].height,
- address=self.address,
- max_lines=1,
- ))
-
- screen_y = self.components[-1].screen_y + self.components[-1].height + 2*GUIConstants.COMPONENT_PADDING
-
- change_type = _("Multisig") if self.is_multisig else self.fingerprint
+ screen_y = self.components[-1].screen_y + self.components[-1].height + GUIConstants.COMPONENT_PADDING
if self.is_change_derivation_path :
- addr_type = _("Change")
+ # TRANSLATOR_NOTE: Describes the address type (change or receive)
+ addr_type = _("change address")
else:
- # TRANSLATOR_NOTE: Abbreviation for receive address
- addr_type = _("Addr")
+ addr_type = _("receive address")
- value_text = "{}: {} #{}".format(change_type, addr_type, self.derivation_path_addr_index)
- self.components.append(IconTextLine(
- value_text=value_text,
- icon_name=SeedSignerIconConstants.FINGERPRINT,
- icon_color=GUIConstants.INFO_COLOR,
- is_text_centered=False,
+ # TRANSLATOR_NOTE: Symbol for index number, e.g. "address #3"
+ index_num_symbol = _("#")
+
+ # note: NOT marking this for translation, hoping that the var ordering will not
+ # need to change in other languages.
+ value_text = f"{addr_type} {index_num_symbol}{self.derivation_path_addr_index}"
+ self.components.append(TextArea(
+ text=value_text,
+ font_color=GUIConstants.LABEL_FONT_COLOR,
+ font_size=GUIConstants.LABEL_FONT_SIZE,
+ is_text_centered=True,
screen_x=GUIConstants.EDGE_PADDING,
screen_y=screen_y,
))
+ self.components.append(FormattedAddress(
+ screen_y=self.components[-1].screen_y + self.components[-1].height,
+ address=self.address,
+ max_lines=1,
+ ))
+
if self.is_change_addr_verified:
+ # How much empty space is left between the bottom of the addr and the first button?
+ available_y = self.buttons[0].screen_y - (self.components[-1].screen_y + self.components[-1].height)
+
self.components.append(IconTextLine(
icon_name=SeedSignerIconConstants.SUCCESS,
icon_color=GUIConstants.SUCCESS_COLOR,
value_text=_("Address verified!"),
- is_text_centered=False,
+ is_text_centered=True,
screen_x=GUIConstants.EDGE_PADDING,
- screen_y=self.components[-1].screen_y + self.components[-1].height + GUIConstants.COMPONENT_PADDING,
+ screen_y=self.components[-1].screen_y + self.components[-1].height,
+ height=available_y, # Let the component auto-center vertically
))
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.