feat(#517): integrate CL8Y Legal clickwrap TermsGate #1051

Merged
PlasticDigits merged 1 commit from feat/517-cl8y-clickwrap into main 2026-08-11 03:27:32 +00:00
PlasticDigits commented 2026-08-11 03:14:43 +00:00 (Migrated from gitlab.com)

Summary

  • Integrates @plasticdigits/cl8y-clickwrap so connected Terra Classic wallets must accept latest CL8Y Terms for property dex.cl8y.com before transactional route content renders (ConnectedTermsGate around <Outlet>).
  • Keeps first-visit RiskAcknowledgementModal (#138); extends VITE_PLAYWRIGHT_E2E to skip Legal gate in Playwright only.
  • Production CSP connect-src adds Legal API + portal hosts (no blanket https:); env examples + soft-launch notes updated.
  • Documents invariants C1–C10 in docs/frontend.md and skills/AGENTS_FRONTEND_CLICKWRAP.md (make verify-issue-517).

Acceptance criteria

  • @plasticdigits/cl8y-clickwrap installed and used; no forked Terra ADR-036 verify in the DEX
  • Frontend uses property dex.cl8y.com consistently
  • Connected wallet without signed_latest cannot reach swap/LP/limit/wrap/create route content (shell gate)
  • Connected wallet with signed_latest renders children without extra friction
  • Redirect uses Terra Classic sign URL via SDK; client-side redirect sanitize; focus re-poll via SDK
  • Existing RiskAcknowledgementModal retained; Playwright skip extended
  • Production CSP allows Legal API; docs list CORS/redirect allowlist ops
  • Footer NFA / risk copy retained
  • Docs/skills/env examples updated
  • Unit + Playwright coverage for gate / escape hatch

Not done in this MR (ops / cross-repo)

  • Property dex.cl8y.com registered on Legal admin API
  • Legal Coolify CORS_ORIGINS includes https://dex.cl8y.com
  • Legal portal rebuild with VITE_REDIRECT_URI_ALLOWLIST including https://dex.cl8y.com
  • Manual soft-launch accept → swap smoke on https://dex.cl8y.com

Test plan

  • make verify-issue-517 (11/11)
  • Playwright e2e/legal-clickwrap-517.spec.ts with PLAYWRIGHT_SKIP_CHAIN=1 (2/2)
  • Soft-launch: connect unsigned → portal Terra Classic sign → return → one swap/LP
  • Browser network: status CORS OK; no CSP violations for Legal API

Closes #517

## Summary - Integrates `@plasticdigits/cl8y-clickwrap` so connected Terra Classic wallets must accept latest CL8Y Terms for property **`dex.cl8y.com`** before transactional route content renders (`ConnectedTermsGate` around `<Outlet>`). - Keeps first-visit `RiskAcknowledgementModal` (#138); extends `VITE_PLAYWRIGHT_E2E` to skip Legal gate in Playwright only. - Production CSP `connect-src` adds Legal API + portal hosts (no blanket `https:`); env examples + soft-launch notes updated. - Documents invariants **C1–C10** in `docs/frontend.md` and `skills/AGENTS_FRONTEND_CLICKWRAP.md` (`make verify-issue-517`). ## Acceptance criteria - [x] `@plasticdigits/cl8y-clickwrap` installed and used; no forked Terra ADR-036 verify in the DEX - [x] Frontend uses property **`dex.cl8y.com`** consistently - [x] Connected wallet without `signed_latest` cannot reach swap/LP/limit/wrap/create route content (shell gate) - [x] Connected wallet with `signed_latest` renders children without extra friction - [x] Redirect uses Terra Classic sign URL via SDK; client-side redirect sanitize; focus re-poll via SDK - [x] Existing `RiskAcknowledgementModal` retained; Playwright skip extended - [x] Production CSP allows Legal API; docs list CORS/redirect allowlist ops - [x] Footer NFA / risk copy retained - [x] Docs/skills/env examples updated - [x] Unit + Playwright coverage for gate / escape hatch ### Not done in this MR (ops / cross-repo) - [ ] Property **`dex.cl8y.com` registered** on Legal admin API - [ ] Legal Coolify `CORS_ORIGINS` includes `https://dex.cl8y.com` - [ ] Legal portal rebuild with `VITE_REDIRECT_URI_ALLOWLIST` including `https://dex.cl8y.com` - [ ] Manual soft-launch accept → swap smoke on `https://dex.cl8y.com` ## Test plan - [x] `make verify-issue-517` (11/11) - [x] Playwright `e2e/legal-clickwrap-517.spec.ts` with `PLAYWRIGHT_SKIP_CHAIN=1` (2/2) - [ ] Soft-launch: connect unsigned → portal Terra Classic sign → return → one swap/LP - [ ] Browser network: status CORS OK; no CSP violations for Legal API Closes #517
PlasticDigits commented 2026-08-11 03:27:32 +00:00 (Migrated from gitlab.com)

mentioned in commit 6e3e2b7c85

mentioned in commit 6e3e2b7c85b04e73b142a3a1e216730ad9a798c3
PlasticDigits (Migrated from gitlab.com) merged commit 6e3e2b7c85 into main 2026-08-11 03:27:32 +00:00
PlasticDigits commented 2026-08-11 03:32:06 +00:00 (Migrated from gitlab.com)

mentioned in commit d44474899a

mentioned in commit d44474899af95b7d00609b39756033d47912d15c
Sign in to join this conversation.
No reviewers
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!1051
No description provided.