feat(frontend): Station + Cosmostation WalletConnect (ustr-cmm parity, no Leap) #566

Closed
opened 2026-08-18 15:22:39 +00:00 by PlasticDigits · 21 comments
PlasticDigits commented 2026-08-18 15:22:39 +00:00 (Migrated from gitlab.com)

Summary

Bring DEX Connect Wallet WalletConnect coverage in line with ustr-cmm for Station and Cosmostation. Leap stays out — vendor sunset (#159).

ustr-cmm’s preregister Terra Classic page (PlasticDigits2/ustr-cmm contracts/external/cmm-ustc-preregister/frontend-dapp/src/pages/TerraClassicPage.tsx) already connects Station and Cosmostation via WalletType.WALLETCONNECT. The DEX Connect list still offers those two as Extension only, so mobile Chrome users without the extension cannot use Station or Cosmostation the way they can Keplr (#554 WC-M10), Lunc Dash, or Galaxy Station.


Scope change (2026-08-19)

Original filing asked for full ustr-cmm wallet parity, including Leap. Product decision: Leap is sunset — do not re-add Leap (extension or WalletConnect). Remaining CMM gap is Station WC + Cosmostation WC.


Problem statement

Desktop Station / Cosmostation extensions already work. On mobile Chrome (no injected extension), Connect Wallet has no Station or Cosmostation WalletConnect row. Those users are sent to an Install desktop-extension path, while CMM already offers mobile WC for the same wallets.


Evidence / current gap

Wallet Transport ustr-cmm production frontend/ ustr-cmm preregister DEX today This issue
Station Extension yes yes yes unchanged
Station WalletConnect no yes controller already special-cases Station WC in wallet.ts; no Connect list row in scope
Keplr Extension yes yes yes unchanged
Keplr WalletConnect no yes yes on mobile without window.keplr (#554) unchanged
Cosmostation Extension yes yes yes unchanged
Cosmostation WalletConnect no yes no Connect row in scope
LUNC Dash WalletConnect yes yes yes unchanged
Galaxy Station WalletConnect yes yes yes unchanged
Leap (any transport) yes (extension) yes (WC) intentionally absent (#159) out of scope — do not add

DEX files:

  • frontend-dapp/src/components/wallet/connectWalletOptions.ts — Station and Cosmostation are WalletType.EXTENSION only; Keplr already flips to WC on mobile
  • frontend-dapp/src/services/terraclassic/wallet.ts — StationController / CosmostationController(WC_PROJECT_ID) exist; Station WC empty-wallet cache path (isStationWC) already exists; no Connect-list entry
  • frontend-dapp/src/utils/walletConnectPairing.ts — Station deep-link (terrastation.page.link) already in WC-M5 allowlist; Cosmostation mobile scheme may need an explicit allowlist entry if the vendor template is not already covered by wc: / intent:
  • Tests: connectWalletOptions.test.ts, WalletModal.test.tsx — Leap must remain absent

ustr-cmm WC calls:

  • Station: connect(WalletName.STATION, WalletType.WALLETCONNECT)
  • Cosmostation: connect(WalletName.COSMOSTATION, WalletType.WALLETCONNECT)

Constraints / guardrails

  1. No Leap. Do not re-add LeapController, a Leap Connect row, a Leap install URL, or Leap WC. Keep purging persisted Leap sessions (#159). Tests that assert “no Leap” stay.
  2. Keep WC-M1–WC-M12 for the new WC rows (#519 / #554): same-device Open + Copy on mobile, desktop QR unchanged, user-gesture deep links, wc: copy via CopyButton, scheme allowlist, bounded connect/cancel, no AppKit/Web3Modal just for this.
  3. Mirror Keplr WC-M10: when isWalletConnectMobileClient() and the extension is not injected, offer Station / Cosmostation as WalletConnect — not Install-only. When the extension is injected (in-app browser), keep the Extension row (WC-M7).
  4. Do not treat WC rows as missing extensions (#139 / #160).
  5. Logos (#490): Station and Cosmostation already have local /wallets/* assets. Do not add a Leap logo.
  6. Production CSP / VITE_WC_PROJECT_ID: do not drop the Vite WC project-id guard (#378).
  7. Legal C1: DEX still must not implement ADR-036; after WC connect without window.keplr, keep the Keplr-browser hint for terms.
  8. Compass / Initia / Leap successors stay out of scope.

Proposed solution (high level)

Reuse the DEX modal / pairing / cancel stack (same pattern as Keplr on mobile Chrome). Do not copy CMM’s glass modal.

  1. resolveConnectWalletOptions: Station and Cosmostation follow Keplr: WalletConnect on mobile when the matching extension is not injected; Extension when it is (or on desktop).
  2. Detection: extend ConnectWalletOptionEnv / isBrowserWalletExtensionDetected so Station uses 'station' in window and Cosmostation uses the existing Keplr-like Cosmostation signal.
  3. Pairing: Station already has a terrastation.page.link builder. Confirm Cosmostation Open / Copy works on Android Chrome; add a documented vendor scheme to WC-M5 only if needed.
  4. Docs / QA / playbooks: docs/frontend.md, QA_TEMPLATE.md, AGENTS_FRONTEND_WALLET_CONNECT_MODAL.md, AGENTS_FRONTEND_WALLETCONNECT_MOBILE.md — Station + Cosmostation WC; Leap still excluded.

Acceptance criteria

  • Mobile Chrome without Station extension: Connect list offers Station via WalletConnect (not Install-only). After Open/Copy + approve, header shows terra1….
  • Mobile Chrome without Cosmostation extension: same for Cosmostation via WalletConnect.
  • Injected Station / Cosmostation (in-app browser) still show Extension + Ready (WC-M7).
  • Desktop: Station / Cosmostation stay Extension; Lunc Dash / Galaxy Station / (desktop) new WC rows stay QR-only (WC-M2).
  • No Leap row, controller, install URL, or WC path. Persisted Leap sessions still cleared (#159).
  • Keplr / Lunc Dash / Galaxy Station WC from #554 still complete.
  • Pairing hrefs stay on an explicit allowlist (WC-M5); no javascript: / arbitrary https from the payload.
  • Docs, QA template, agent playbooks, and make verify-issue-566 (or documented equivalent) updated.

Test plan (functional)

  1. Unit — options: mobile + no Station injection → Station WC; Station injected → Extension. Same for Cosmostation. Desktop without injection stays Extension. Leap is not in the list.
  2. Unit — modal: no Leap; Station/Cosmostation WC vs Extension as above.
  3. Unit — pairing: Station terrastation.page.link / Hexxagon still allowlisted; Cosmostation scheme (if added) allowlisted; javascript: / off-allowlist https rejected.
  4. Manual Android Chrome: Station WC Open + Copy; Cosmostation WC Open + Copy; Keplr / Lunc Dash / Galaxy Station still work.
  5. Manual desktop: Station / Cosmostation extension unchanged.
  6. Regression: make verify-issue-554 / make verify-issue-519 stay green; #159 “no Leap” tests stay green.

Test plan (attack / abuse)

Vector Expectation
Pairing URI javascript: / data: / attacker https Rejected (WC-M5)
Late WC session after Cancel Must not attach; spinner clears
Leap reintroduced via leftover enum / localStorage No Leap row; persisted Leap still purged
Logo / CSP No remote wallet-icon fetch; local /wallets/* only

Verification

  • make verify-issue-566 (new) plus make verify-issue-554.
  • Manual matrix: Android Chrome Station WC, Cosmostation WC; desktop extensions; confirm Leap absent vs ust1cmm.com (CMM may still show Leap — DEX must not).

Owner type

frontend

Priority

P2 — mobile Station / Cosmostation reach; not funds-at-risk.

## Summary Bring DEX Connect Wallet **WalletConnect** coverage in line with ustr-cmm for **Station** and **Cosmostation**. **Leap stays out** — vendor sunset ([#159](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/159)). ustr-cmm’s preregister Terra Classic page (`PlasticDigits2/ustr-cmm` `contracts/external/cmm-ustc-preregister/frontend-dapp/src/pages/TerraClassicPage.tsx`) already connects Station and Cosmostation via `WalletType.WALLETCONNECT`. The DEX Connect list still offers those two as **Extension only**, so mobile Chrome users without the extension cannot use Station or Cosmostation the way they can Keplr ([#554](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/554) **WC-M10**), Lunc Dash, or Galaxy Station. --- ## Scope change (2026-08-19) Original filing asked for full ustr-cmm wallet parity, including Leap. Product decision: **Leap is sunset — do not re-add Leap** (extension or WalletConnect). Remaining CMM gap is Station WC + Cosmostation WC. --- ## Problem statement Desktop Station / Cosmostation extensions already work. On mobile Chrome (no injected extension), Connect Wallet has no Station or Cosmostation WalletConnect row. Those users are sent to an **Install** desktop-extension path, while CMM already offers mobile WC for the same wallets. --- ## Evidence / current gap | Wallet | Transport | ustr-cmm production `frontend/` | ustr-cmm preregister | DEX today | This issue | |--------|-----------|----------------------------------|----------------------|-----------|------------| | Station | Extension | yes | yes | yes | unchanged | | Station | WalletConnect | no | **yes** | controller already special-cases Station WC in `wallet.ts`; **no Connect list row** | **in scope** | | Keplr | Extension | yes | yes | yes | unchanged | | Keplr | WalletConnect | no | yes | yes on mobile without `window.keplr` ([#554](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/554)) | unchanged | | Cosmostation | Extension | yes | yes | yes | unchanged | | Cosmostation | WalletConnect | no | **yes** | **no** Connect row | **in scope** | | LUNC Dash | WalletConnect | yes | yes | yes | unchanged | | Galaxy Station | WalletConnect | yes | yes | yes | unchanged | | **Leap** (any transport) | | yes (extension) | yes (WC) | **intentionally absent** ([#159](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/159)) | **out of scope — do not add** | DEX files: - `frontend-dapp/src/components/wallet/connectWalletOptions.ts` — Station and Cosmostation are `WalletType.EXTENSION` only; Keplr already flips to WC on mobile - `frontend-dapp/src/services/terraclassic/wallet.ts` — `StationController` / `CosmostationController(WC_PROJECT_ID)` exist; Station WC empty-wallet cache path (`isStationWC`) already exists; no Connect-list entry - `frontend-dapp/src/utils/walletConnectPairing.ts` — Station deep-link (`terrastation.page.link`) already in **WC-M5** allowlist; Cosmostation mobile scheme may need an explicit allowlist entry if the vendor template is not already covered by `wc:` / `intent:` - Tests: `connectWalletOptions.test.ts`, `WalletModal.test.tsx` — Leap must remain absent ustr-cmm WC calls: - Station: `connect(WalletName.STATION, WalletType.WALLETCONNECT)` - Cosmostation: `connect(WalletName.COSMOSTATION, WalletType.WALLETCONNECT)` --- ## Constraints / guardrails 1. **No Leap.** Do not re-add `LeapController`, a Leap Connect row, a Leap install URL, or Leap WC. Keep purging persisted Leap sessions ([#159](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/159)). Tests that assert “no Leap” stay. 2. **Keep WC-M1–WC-M12** for the new WC rows ([#519](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/519) / [#554](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/554)): same-device Open + Copy on mobile, desktop QR unchanged, user-gesture deep links, `wc:` copy via `CopyButton`, scheme allowlist, bounded connect/cancel, no AppKit/Web3Modal just for this. 3. **Mirror Keplr WC-M10:** when `isWalletConnectMobileClient()` and the extension is **not** injected, offer Station / Cosmostation as WalletConnect — not Install-only. When the extension **is** injected (in-app browser), keep the Extension row (**WC-M7**). 4. **Do not treat WC rows as missing extensions** ([#139](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/139) / [#160](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/160)). 5. **Logos (#490):** Station and Cosmostation already have local `/wallets/*` assets. Do not add a Leap logo. 6. **Production CSP / `VITE_WC_PROJECT_ID`:** do not drop the Vite WC project-id guard ([#378](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/378)). 7. **Legal C1:** DEX still must not implement ADR-036; after WC connect without `window.keplr`, keep the Keplr-browser hint for terms. 8. **Compass / Initia / Leap successors** stay out of scope. --- ## Proposed solution (high level) Reuse the DEX modal / pairing / cancel stack (same pattern as Keplr on mobile Chrome). Do not copy CMM’s glass modal. 1. **`resolveConnectWalletOptions`:** Station and Cosmostation follow Keplr: WalletConnect on mobile when the matching extension is not injected; Extension when it is (or on desktop). 2. **Detection:** extend `ConnectWalletOptionEnv` / `isBrowserWalletExtensionDetected` so Station uses `'station' in window` and Cosmostation uses the existing Keplr-like Cosmostation signal. 3. **Pairing:** Station already has a `terrastation.page.link` builder. Confirm Cosmostation Open / Copy works on Android Chrome; add a documented vendor scheme to **WC-M5** only if needed. 4. **Docs / QA / playbooks:** `docs/frontend.md`, `QA_TEMPLATE.md`, `AGENTS_FRONTEND_WALLET_CONNECT_MODAL.md`, `AGENTS_FRONTEND_WALLETCONNECT_MOBILE.md` — Station + Cosmostation WC; Leap still excluded. --- ## Acceptance criteria - [ ] Mobile Chrome without Station extension: Connect list offers **Station via WalletConnect** (not Install-only). After Open/Copy + approve, header shows `terra1…`. - [ ] Mobile Chrome without Cosmostation extension: same for **Cosmostation via WalletConnect**. - [ ] Injected Station / Cosmostation (in-app browser) still show **Extension** + Ready (**WC-M7**). - [ ] Desktop: Station / Cosmostation stay Extension; Lunc Dash / Galaxy Station / (desktop) new WC rows stay QR-only (**WC-M2**). - [ ] **No Leap** row, controller, install URL, or WC path. Persisted Leap sessions still cleared ([#159](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/159)). - [ ] Keplr / Lunc Dash / Galaxy Station WC from [#554](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/554) still complete. - [ ] Pairing hrefs stay on an explicit allowlist (**WC-M5**); no `javascript:` / arbitrary https from the payload. - [ ] Docs, QA template, agent playbooks, and `make verify-issue-566` (or documented equivalent) updated. --- ## Test plan (functional) 1. **Unit — options:** mobile + no Station injection → Station WC; Station injected → Extension. Same for Cosmostation. Desktop without injection stays Extension. **Leap is not in the list.** 2. **Unit — modal:** no Leap; Station/Cosmostation WC vs Extension as above. 3. **Unit — pairing:** Station `terrastation.page.link` / Hexxagon still allowlisted; Cosmostation scheme (if added) allowlisted; `javascript:` / off-allowlist https rejected. 4. **Manual Android Chrome:** Station WC Open + Copy; Cosmostation WC Open + Copy; Keplr / Lunc Dash / Galaxy Station still work. 5. **Manual desktop:** Station / Cosmostation extension unchanged. 6. **Regression:** `make verify-issue-554` / `make verify-issue-519` stay green; #159 “no Leap” tests stay green. ## Test plan (attack / abuse) | Vector | Expectation | |--------|-------------| | Pairing URI `javascript:` / `data:` / attacker https | Rejected (**WC-M5**) | | Late WC session after Cancel | Must not attach; spinner clears | | Leap reintroduced via leftover enum / localStorage | No Leap row; persisted Leap still purged | | Logo / CSP | No remote wallet-icon fetch; local `/wallets/*` only | ## Verification - `make verify-issue-566` (new) plus `make verify-issue-554`. - Manual matrix: Android Chrome Station WC, Cosmostation WC; desktop extensions; confirm Leap absent vs `ust1cmm.com` (CMM may still show Leap — DEX must not). ## Owner type frontend ## Priority P2 — mobile Station / Cosmostation reach; not funds-at-risk. ## Related - ustr-cmm: [`PlasticDigits2/ustr-cmm`](https://gitlab.com/PlasticDigits2/ustr-cmm) preregister `TerraClassicPage.tsx` (Station WC + Cosmostation WC) - DEX: [#159](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/159) (Leap sunset — **keep excluded**), [#519](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/519) / [#554](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/554) (mobile WC), [#490](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/490) (logos)
PlasticDigits commented 2026-08-18 15:22:40 +00:00 (Migrated from gitlab.com)

marked as related to #159

marked as related to #159
PlasticDigits commented 2026-08-18 15:22:41 +00:00 (Migrated from gitlab.com)

marked as related to #554

marked as related to #554
PlasticDigits commented 2026-08-18 15:22:42 +00:00 (Migrated from gitlab.com)

marked as related to #519

marked as related to #519
PlasticDigits commented 2026-08-18 15:22:42 +00:00 (Migrated from gitlab.com)

marked as related to #490

marked as related to #490
PlasticDigits commented 2026-08-18 15:26:06 +00:00 (Migrated from gitlab.com)

changed title from feat(frontend): Terra Classic wallet parity with ustr-cmm to feat(frontend): Station + Cosmostation WalletConnect (ustr-cmm parity, no Leap)

<p>changed title from <code class="idiff">feat(frontend): <span class="idiff left right deletion">Terra Classic wallet parity with ustr-cmm</span></code> to <code class="idiff">feat(frontend): <span class="idiff left right addition">Station + Cosmostation WalletConnect (ustr-cmm parity, no Leap)</span></code></p>
PlasticDigits commented 2026-08-18 15:26:06 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-08-18 15:26:13 +00:00 (Migrated from gitlab.com)

Scope update: Leap stays excluded (vendor sunset, #159). This issue is now Station WalletConnect + Cosmostation WalletConnect only, matching ustr-cmm’s preregister Terra Classic WC paths. Do not re-add Leap extension or Leap WC.

Scope update: **Leap stays excluded** (vendor sunset, [#159](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/159)). This issue is now **Station WalletConnect + Cosmostation WalletConnect** only, matching ustr-cmm’s preregister Terra Classic WC paths. Do not re-add Leap extension or Leap WC.
PlasticDigits commented 2026-08-19 00:53:59 +00:00 (Migrated from gitlab.com)

mentioned in commit a6da62eeb2

mentioned in commit a6da62eeb258042ebc093061dce39690d41a8e75
PlasticDigits commented 2026-08-19 00:54:11 +00:00 (Migrated from gitlab.com)

mentioned in merge request !1087

mentioned in merge request !1087
PlasticDigits commented 2026-08-19 01:58:07 +00:00 (Migrated from gitlab.com)

mentioned in commit 45c9e4c6ea

mentioned in commit 45c9e4c6ea3a625390dd046a228814041049c8cd
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-08-19 01:58:07 +00:00
PlasticDigits commented 2026-08-19 02:00:24 +00:00 (Migrated from gitlab.com)

mentioned in commit adc91bb474

mentioned in commit adc91bb47400a06de0ec6bd2aa240a92e5ace81d
PlasticDigits commented 2026-08-19 02:16:57 +00:00 (Migrated from gitlab.com)

Post-merge note (!1087 on main). Station + Cosmostation WalletConnect paths (WC-M2/M5/M7, Leap excluded) are on main.

Remaining (code AC is partial until device QA):

  • Manual Android Chrome: Station WC Open + Copy → terra1…; Cosmostation same.
  • Manual: in-app Station/Cosmostation stay Extension + Ready; desktop stays Extension; Lunc Dash / Galaxy Station QR-only; Leap absent.
  • CI was not waited. Run make verify-issue-566.
**Post-merge note (!1087 on main).** Station + Cosmostation WalletConnect paths (WC-M2/M5/M7, Leap excluded) are on `main`. Remaining (code AC is partial until device QA): - Manual Android Chrome: Station WC Open + Copy → `terra1…`; Cosmostation same. - Manual: in-app Station/Cosmostation stay Extension + Ready; desktop stays Extension; Lunc Dash / Galaxy Station QR-only; Leap absent. - CI was not waited. Run `make verify-issue-566`.
PlasticDigits commented 2026-08-19 02:28:46 +00:00 (Migrated from gitlab.com)

mentioned in issue #573

mentioned in issue #573
PlasticDigits commented 2026-08-19 02:29:00 +00:00 (Migrated from gitlab.com)

marked as related to #573

marked as related to #573
PlasticDigits commented 2026-08-21 11:32:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #588

mentioned in issue #588
PlasticDigits commented 2026-08-21 11:32:52 +00:00 (Migrated from gitlab.com)

mentioned in issue #511

mentioned in issue #511
PlasticDigits commented 2026-08-26 04:08:01 +00:00 (Migrated from gitlab.com)

mentioned in issue #658

mentioned in issue #658
PlasticDigits commented 2026-08-26 04:08:02 +00:00 (Migrated from gitlab.com)

marked as related to #658

marked as related to #658
PlasticDigits commented 2026-08-26 04:23:24 +00:00 (Migrated from gitlab.com)

mentioned in issue #672

mentioned in issue #672
PlasticDigits commented 2026-08-27 00:20:45 +00:00 (Migrated from gitlab.com)

mentioned in issue #679

mentioned in issue #679
PlasticDigits commented 2026-08-27 00:20:55 +00:00 (Migrated from gitlab.com)

mentioned in issue #681

mentioned in issue #681
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic#566
No description provided.