fix(wallet): remove bundled WalletConnect project ID — env-only (v0.17.2) - #41
Merged
Conversation
…7.2) Reverts the v0.17.1 bundled default. A project id baked into an open-source client ships publicly (repo + PyPI sdist) where anyone can extract it and burn the shared Reown relay quota — degrading WalletConnect for all users. Reown's own guidance: don't commit project keys; use env vars. * bridges/wc_client.py: drop the bundled default + _bridge_env; the bridge inherits WALLETCONNECT_PROJECT_ID from the environment (e.g. ~/.hermes/.env). * commands/doctor.py: WC project ID reports not-configured (with a setup hint) until the env var is set. The 0.17.1 default id has been rotated out + disabled in Reown, so it's dead regardless. A safe shared-default would require a server-side relay proxy (id never reaches clients) — future work, not a bundled public key. Verification: 4575 passed, 8 skipped; 100% coverage (16,249 stmts, 0 missing); ruff check + format clean; plugin.yaml byte-identical.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts the v0.17.1 bundled default. Baking a project id into an open-source client ships it publicly (repo + PyPI sdist), where anyone can extract it and burn the shared Reown relay quota — Reown's own guidance is "don't commit project keys; use env vars."
Changes
bridges/wc_client.py: drop the bundled default +_bridge_env; the WC bridge inheritsWALLETCONNECT_PROJECT_IDfrom the environment (~/.hermes/.env). Unset → clear "set WALLETCONNECT_PROJECT_ID" error.commands/doctor.py: WC project ID reports not-configured (with a setup hint) until set.The 0.17.1 default id has been rotated out and disabled in Reown, so it's dead regardless. A safe shared default would need a server-side relay proxy (id never reaches clients) — future work.
Verification