What changed, and why it matters
This commit is a minor code cleanup ('nits'). It moves a helper function, adds a comment, and removes an unused local import. There is no change to user-facing behavior or security logic.
No security action needed. Treat as routine cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff in shared/flow.py reorders has_pushtx_url(), adds a comment about ‘Spending Policy (Hobbled mode) predicates’, and removes a stray ‘# SSSP’ comment. The diff in shared/seed.py removes an unused ‘from pincodes import pa’ line inside not_hobbled_mode() because pa is already imported at module scope. These are cosmetic/refactoring changes only.
Changed components
shared/flow.pyshared/seed.pyInspect captured patch +7 / −5
diff --git a/shared/flow.py b/shared/flow.py
index c59cdc0..6c68784 100644
--- a/shared/flow.py
+++ b/shared/flow.py
@@ -105,14 +105,16 @@ def qr_and_ms():
if not version.has_qr: return False
return bool(settings.get('multisig', False))
+def has_pushtx_url():
+ # they want to use PushTX feature
+ return bool(settings.get("ptxurl", False))
+
+# Spending Policy (Hobbled mode) predicates.
+#
def is_hobble_testdrive():
from pincodes import pa
return (pa.hobbled_mode == 2)
-def has_pushtx_url():
- return bool(settings.get("ptxurl", False))
-
-# SSSP
def sssp_related_keys():
return sssp_spending_policy('okeys')
diff --git a/shared/seed.py b/shared/seed.py
index 791a8b8..298146a 100644
--- a/shared/seed.py
+++ b/shared/seed.py
@@ -41,7 +41,7 @@ _PREFIX_MARKER = const(1<<26)
VaultEntry = namedtuple('VaultEntry', 'xfp encoded label origin')
def not_hobbled_mode():
- from pincodes import pa
+ # used as menu predicate and similar
return not pa.hobbled_mode
def seed_vault_iter():
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.