Skip to content

feat(wallet): bundle a default WalletConnect project ID (v0.17.1) - #40

Merged
clawnchdev merged 1 commit into
mainfrom
feat/walletconnect-default-project-id
Jun 3, 2026
Merged

feat(wallet): bundle a default WalletConnect project ID (v0.17.1)#40
clawnchdev merged 1 commit into
mainfrom
feat/walletconnect-default-project-id

Conversation

@clawnchdev

Copy link
Copy Markdown
Owner

Why

You asked the right question: a WalletConnect project ID should be project-level, not per-user. Correct — a WC project ID is a per-application, public client identifier (dapps embed a single one for all users; it ships in browser bundles and isn't a secret). clawmes was wrongly requiring every user to create their own and set WALLETCONNECT_PROJECT_ID before WalletConnect would work.

Change

Bundle Clawnch's Reown project ID as the default so /connect and clawnchconnect(mode=walletconnect) work out of the box:

  • bridges/wc_client.py: new _bridge_env() injects WALLETCONNECT_PROJECT_ID into the WC bridge subprocess env. The env var wins when set + non-empty; otherwise the bundled default is used (an explicitly-empty value also falls back).
  • commands/doctor.py: WC project ID now shows [ok] by default and notes when the bundled default is in use.

Override with your own WALLETCONNECT_PROJECT_ID (e.g. in ~/.hermes/.env) to use a separate Reown relay quota / analytics.

Tradeoff (documented)

All default-id traffic counts against one shared Reown relay quota (Reown free tier has connection caps; a single shared ID is also a single point of failure if it gets rate-limited). Mitigations: monitor usage / upgrade the Reown plan, and the env override lets heavy users split off. It's a public identifier, so bundling it in the repo is fine; consider adding allowed-origins in the Reown dashboard if abuse appears.

Verification

  • 4580 passed, 8 skipped; 100% line coverage (16,255 stmts, 0 missing)
  • ruff check + ruff format --check clean
  • plugin.yaml byte-identical
  • Existing doctor WC test still green; added unset-default + override + empty-fallback tests

A WalletConnect project ID is a per-application, public client identifier (a
dapp ships one for all its users; it's in browser bundles, not a secret) — not
a per-user secret. clawmes previously required every user to create their own
and set WALLETCONNECT_PROJECT_ID before WalletConnect would work at all.

Bundle a default (Clawnch's Reown project ID) so /connect and
clawnchconnect(mode=walletconnect) work out of the box:

* bridges/wc_client.py: new _bridge_env() injects WALLETCONNECT_PROJECT_ID into
  the WC bridge subprocess env — the env var wins when set+non-empty, else the
  bundled default (an explicitly-empty value also falls back).
* commands/doctor.py: WC project ID now reports [ok] by default, noting when the
  bundled default is in use.

Override with your own WALLETCONNECT_PROJECT_ID (e.g. in ~/.hermes/.env) to use
a separate Reown relay quota / analytics.

Verification: 4580 passed, 8 skipped; 100% line coverage (16,255 stmts, 0
missing); ruff check + format clean; plugin.yaml byte-identical.
@clawnchdev
clawnchdev merged commit 00ff48a into main Jun 3, 2026
4 checks passed
@clawnchdev
clawnchdev deleted the feat/walletconnect-default-project-id branch June 3, 2026 00:13
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.

1 participant