Skip to content

fix: guard spectrum_endpoint.wallets_get behind extension check#2535

Merged
k9ert merged 2 commits intocryptoadvance:masterfrom
al-munazzim:fix-endpoint-wallets-get
Mar 21, 2026
Merged

fix: guard spectrum_endpoint.wallets_get behind extension check#2535
k9ert merged 2 commits intocryptoadvance:masterfrom
al-munazzim:fix-endpoint-wallets-get

Conversation

@al-munazzim
Copy link
Copy Markdown
Contributor

The "Support Tools" section in general_settings.jinja calls url_for('spectrum_endpoint.wallets_get') unconditionally. When the Spectrum extension is not installed (common in source installs), this causes a Jinja BuildError on the settings page.

Fix: Wrap the Support Tools block in {% if "spectrum" in specter.service_manager.services %} so the link only renders when the extension is actually loaded.

One-line template change, no Python changes needed.

Closes #2498

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 5, 2026

Deploy Preview for specter-desktop-docs canceled.

Name Link
🔨 Latest commit d52656d
🔍 Latest deploy log https://app.netlify.com/projects/specter-desktop-docs/deploys/69be7f43ebbd7e00087d1ac6

The Support Tools section in general_settings.jinja references
spectrum_endpoint.wallets_get unconditionally, causing a BuildError
when the Spectrum extension is not installed.

Wrap the section in a Jinja conditional that checks whether the
spectrum extension is loaded before rendering the link.

Fixes cryptoadvance#2498
…dvance#2498)

Static template analysis tests that ensure:
- All spectrum_endpoint references are inside a service_manager conditional
- The guard block has a matching endif
- The url_for call is within the guarded block

Prevents regression: if someone removes the guard, tests catch it.
@k9ert k9ert force-pushed the fix-endpoint-wallets-get branch from 92845f9 to d52656d Compare March 21, 2026 11:21
@k9ert k9ert merged commit 31524e4 into cryptoadvance:master Mar 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Invalid Endpoint spectrum_endpoint.wallets_get in general_settings.jinja (v2.1.1)

2 participants