What changed, and why it matters
This commit only renames internal test variables and settings strings from 'coord' to 'xpub_qr'. It is a cleanup change with no effect on the actual wallet software users run, and no security relevance.
No action required; this is a non-security test-only refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit updates four test files to replace legacy ‘coord’/’coords’ terminology with ‘xpub_qr’/’xpub_qr_formats’ in unit tests and SettingsQR test payloads. No application code, parsing logic, cryptography, or user-facing behavior is changed. The SettingsQR test strings now use ‘xpub_qr=urca,sta’ instead of ‘coords=spa,spd’, matching a previously completed rename in the production settings constants.
Changed components
tests/test_flows_seed.pytests/test_flows_settings.pytests/test_settings.pytests/test_settingsqr_decoder.pyInspect captured patch +10 / −10
diff --git a/tests/test_flows_seed.py b/tests/test_flows_seed.py
index 29fe379..23b5067 100644
--- a/tests/test_flows_seed.py
+++ b/tests/test_flows_seed.py
@@ -184,7 +184,7 @@ class TestSeedFlows(FlowTest):
"""
Selecting "Export XPUB" from the SeedOptionsView should enter the Export XPUB flow and end at the MainMenuView
"""
- def flowtest_standard_xpub(sig_tuple, script_tuple, coord_tuple):
+ def flowtest_standard_xpub(sig_tuple, script_tuple, xpub_qr_tuple):
if sig_tuple[0] == SettingsConstants.SINGLE_SIG:
sig_selection = seed_views.SeedExportXpubSigTypeView.SINGLE_SIG
else:
@@ -195,7 +195,7 @@ class TestSeedFlows(FlowTest):
FlowStep(seed_views.SeedOptionsView, button_data_selection=seed_views.SeedOptionsView.EXPORT_XPUB),
FlowStep(seed_views.SeedExportXpubSigTypeView, button_data_selection=sig_selection),
FlowStep(seed_views.SeedExportXpubScriptTypeView, button_data_selection=ButtonOption(script_tuple[1], return_data=script_tuple[0])),
- FlowStep(seed_views.SeedExportXpubQRFormatView, button_data_selection=ButtonOption(coord_tuple[1], return_data=coord_tuple[0])),
+ FlowStep(seed_views.SeedExportXpubQRFormatView, button_data_selection=ButtonOption(xpub_qr_tuple[1], return_data=xpub_qr_tuple[0])),
FlowStep(seed_views.SeedExportXpubWarningView, screen_return_value=0),
FlowStep(seed_views.SeedExportXpubDetailsView, screen_return_value=0),
FlowStep(seed_views.SeedExportXpubQRDisplayView, screen_return_value=0),
@@ -221,7 +221,7 @@ class TestSeedFlows(FlowTest):
# exhaustively test flows thru standard sig_types, script_types, and xpub_qr_formats
for sig_tuple in sig_types:
for script_tuple in script_types:
- for coord_tuple in xpub_qr_formats:
+ for xpub_qr_tuple in xpub_qr_formats:
# skip custom derivation
if script_tuple[0] == SettingsConstants.CUSTOM_DERIVATION:
continue
@@ -229,13 +229,13 @@ class TestSeedFlows(FlowTest):
elif sig_tuple[0] == SettingsConstants.MULTISIG and script_tuple[0] == SettingsConstants.TAPROOT:
continue
else:
- print('\n\ntest_standard_xpubs(%s, %s, %s)' % (sig_tuple, script_tuple, coord_tuple))
- flowtest_standard_xpub(sig_tuple, script_tuple, coord_tuple)
+ print('\n\ntest_standard_xpubs(%s, %s, %s)' % (sig_tuple, script_tuple, xpub_qr_tuple))
+ flowtest_standard_xpub(sig_tuple, script_tuple, xpub_qr_tuple)
def test_export_xpub_disabled_not_available_flow(self):
"""
- If sig_type/script_type/coordinator disabled, then these options are not available
+ If sig_type/script_type/xpub_qr_format disabled, then these options are not available
"""
# Load a finalized Seed into the Controller
mnemonic = "blush twice taste dawn feed second opinion lazy thumb play neglect impact".split()
diff --git a/tests/test_flows_settings.py b/tests/test_flows_settings.py
index ac2381a..2dcc4e6 100644
--- a/tests/test_flows_settings.py
+++ b/tests/test_flows_settings.py
@@ -79,11 +79,11 @@ class TestSettingsFlows(FlowTest):
MainMenuView.
"""
def load_persistent_settingsqr_into_decoder(view: scan_views.ScanView):
- settingsqr_data_persistent: str = "settings::v1 name=Total_noob_mode persistent=E coords=spa,spd denom=thr network=M qr_density=M xpub_export=E sigs=ss scripts=nat xpub_details=E passphrase=E camera=0 compact_seedqr=E bip85=D priv_warn=E dire_warn=E partners=E"
+ settingsqr_data_persistent: str = "settings::v1 name=Total_noob_mode persistent=E xpub_qr=urca,sta denom=thr network=M qr_density=M xpub_export=E sigs=ss scripts=nat xpub_details=E passphrase=E camera=0 compact_seedqr=E bip85=D priv_warn=E dire_warn=E partners=E"
view.decoder.add_data(settingsqr_data_persistent)
def load_not_persistent_settingsqr_into_decoder(view: scan_views.ScanView):
- settingsqr_data_not_persistent: str = "settings::v1 name=Ephemeral_noob_mode persistent=D coords=spa,spd denom=thr network=M qr_density=M xpub_export=E sigs=ss scripts=nat xpub_details=E passphrase=E camera=0 compact_seedqr=E bip85=D priv_warn=E dire_warn=E partners=E"
+ settingsqr_data_not_persistent: str = "settings::v1 name=Ephemeral_noob_mode persistent=D xpub_qr=urca,sta denom=thr network=M qr_density=M xpub_export=E sigs=ss scripts=nat xpub_details=E passphrase=E camera=0 compact_seedqr=E bip85=D priv_warn=E dire_warn=E partners=E"
view.decoder.add_data(settingsqr_data_not_persistent)
def _run_test(initial_setting_state: str, load_settingsqr_into_decoder: Callable, expected_setting_state: str):
diff --git a/tests/test_settings.py b/tests/test_settings.py
index 7b4a3cf..ec589c8 100644
--- a/tests/test_settings.py
+++ b/tests/test_settings.py
@@ -41,7 +41,7 @@ class TestSettings(BaseTest):
return the resulting config_name and formatted settings_update_dict.
"""
settings_name = "Test SettingsQR"
- settingsqr_data = f"""settings::v1 name={ settings_name.replace(" ", "_") } persistent=D coords=spa,spd denom=thr network=M qr_density=M xpub_export=E sigs=ss,ms scripts=nat,nes,tr xpub_qr=urca,sta xpub_details=E passphrase=E camera=180 compact_seedqr=E bip85=D priv_warn=E dire_warn=E partners=E"""
+ settingsqr_data = f"""settings::v1 name={ settings_name.replace(" ", "_") } persistent=D xpub_qr=urca,sta denom=thr network=M qr_density=M xpub_export=E sigs=ss,ms scripts=nat,nes,tr xpub_qr=urca,sta xpub_details=E passphrase=E camera=180 compact_seedqr=E bip85=D priv_warn=E dire_warn=E partners=E"""
# First explicitly set settings that differ from the settingsqr_data
self.settings.set_value(SettingsConstants.SETTING__COMPACT_SEEDQR, SettingsConstants.OPTION__DISABLED)
diff --git a/tests/test_settingsqr_decoder.py b/tests/test_settingsqr_decoder.py
index bb124c4..4f4136d 100644
--- a/tests/test_settingsqr_decoder.py
+++ b/tests/test_settingsqr_decoder.py
@@ -9,7 +9,7 @@ class TestSettingsQRDecoder:
with parsing the result.
"""
settings_name = "Test SettingsQR"
- settings_qr_str = f"""settings::v1 name={ settings_name.replace(" ", "_") } persistent=D coords=spa,spd denom=thr network=M qr_density=M xpub_export=E sigs=ss,ms scripts=nat,nes,tr xpub_details=E passphrase=E camera=180 compact_seedqr=E bip85=D priv_warn=E dire_warn=E partners=E"""
+ settings_qr_str = f"""settings::v1 name={ settings_name.replace(" ", "_") } persistent=D xpub_qr=urca,sta denom=thr network=M qr_density=M xpub_export=E sigs=ss,ms scripts=nat,nes,tr xpub_details=E passphrase=E camera=180 compact_seedqr=E bip85=D priv_warn=E dire_warn=E partners=E"""
# Now parse the settings_qr_str
decoder = DecodeQR()
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.