fix(frontend): EVM Legal Accept next step for Chrome/Safari and WalletConnect #27

Merged
PlasticDigits merged 1 commit from fix/16-evm-legal-inapp-hint into main 2026-08-30 17:57:28 +00:00
PlasticDigits commented 2026-08-30 17:56:39 +00:00 (Migrated from gitlab.com)

Summary

  • Unsigned EVM users on Chrome/Safari (no inject) or WalletConnect now get Open in MetaMask plus Copy link on the voting gate instead of only Accept, which landed on Legal “No EVM wallet found” (#16).
  • Accept / copy URLs include property, sanitized redirect_uri, app_name=CL8Y Voting, and the connected account=0x…. Vendor fallback buildSignUrl / TermsGate pass account when the published SDK is missing.
  • Terra Keplr hint stays Terra-only. TermsGate still fail-closes propose/vote. Documented L-EVM1–L-EVM5 in docs/FRONTEND.md; skills updated for 3rd-party agents.

Related to #16. Does not close the issue: portal sign for MetaMask iOS / Binance Web3 still depends on cl8y-ecosystem-legal#15.

Issue criteria

Done in this MR

  • Unsigned EVM on mobile Chrome/Safari is not left with only Accept (hint + copy Legal /sign/evm link).
  • Accept URL includes property, sanitized redirect_uri, app_name=CL8Y Voting, connected account=0x….
  • Terra LegalKeplrInAppHint still shows for unsigned Terra without Keplr; hidden for EVM.
  • TermsGate fail-closes when signed_latest is false or status errors. WC connect does not skip the gate.
  • Vendor fallback buildSignUrl / TermsGate pass account.
  • Skill: EVM hint is required, not a parenthetical (skills/AGENTS_LEGAL_CLICKWRAP.md).
  • No Binance bnc:// invented (copy + MetaMask only; documented https://link.metamask.io/dapp/).

Not done (out of this MR / blocked)

  • After Legal #15: MetaMask iOS or Binance Web3 → Accept → portal sign → signed_latest: true → return to vote.cl8y.com (200).
  • Live desktop injected MetaMask → Accept → portal (unit-tested hide-hint path only).
  • Production Coolify hatch unset (ops; already guarded by prodEnvGuards).

Test plan

  • cd frontend && npm test (110, then restest 27 Legal/EVM cases)
  • Playwright (existing hatch E2E; does not exercise TermsGate): spa routes, unregistered, pending register, canonical /, /vote alias
  • Manual: unsigned BSC on mobile system browser at https://vote.cl8y.com sees Open in MetaMask / Copy link
  • Manual after Legal #15: complete EVM terms from that path; status API signed_latest: true; return URL is voting origin
  • Confirm Coolify still has VITE_PLAYWRIGHT_E2E unset
## Summary - Unsigned EVM users on Chrome/Safari (no inject) or WalletConnect now get **Open in MetaMask** plus **Copy link** on the voting gate instead of only Accept, which landed on Legal “No EVM wallet found” ([#16](https://gitlab.com/PlasticDigits/voting/-/issues/16)). - Accept / copy URLs include `property`, sanitized `redirect_uri`, `app_name=CL8Y Voting`, and the **connected** `account=0x…`. Vendor fallback `buildSignUrl` / `TermsGate` pass `account` when the published SDK is missing. - Terra Keplr hint stays Terra-only. TermsGate still fail-closes propose/vote. Documented L-EVM1–L-EVM5 in [`docs/FRONTEND.md`](docs/FRONTEND.md); skills updated for 3rd-party agents. Related to [#16](https://gitlab.com/PlasticDigits/voting/-/issues/16). Does **not** close the issue: portal sign for MetaMask iOS / Binance Web3 still depends on [cl8y-ecosystem-legal#15](https://gitlab.com/PlasticDigits/cl8y-ecosystem-legal/-/issues/15). ## Issue criteria **Done in this MR** - [x] Unsigned EVM on mobile Chrome/Safari is not left with **only** Accept (hint + copy Legal `/sign/evm` link). - [x] Accept URL includes `property`, sanitized `redirect_uri`, `app_name=CL8Y Voting`, connected `account=0x…`. - [x] Terra `LegalKeplrInAppHint` still shows for unsigned Terra without Keplr; hidden for EVM. - [x] TermsGate fail-closes when `signed_latest` is false or status errors. WC connect does not skip the gate. - [x] Vendor fallback `buildSignUrl` / `TermsGate` pass `account`. - [x] Skill: EVM hint is required, not a parenthetical (`skills/AGENTS_LEGAL_CLICKWRAP.md`). - [x] No Binance `bnc://` invented (copy + MetaMask only; documented `https://link.metamask.io/dapp/`). **Not done (out of this MR / blocked)** - [ ] After Legal #15: MetaMask iOS or Binance Web3 → Accept → portal sign → `signed_latest: true` → return to `vote.cl8y.com` (200). - [ ] Live desktop injected MetaMask → Accept → portal (unit-tested hide-hint path only). - [ ] Production Coolify hatch unset (ops; already guarded by `prodEnvGuards`). ## Test plan - [x] `cd frontend && npm test` (110, then restest 27 Legal/EVM cases) - [x] Playwright (existing hatch E2E; does not exercise TermsGate): spa routes, unregistered, pending register, canonical `/`, `/vote` alias - [ ] Manual: unsigned BSC on mobile system browser at `https://vote.cl8y.com` sees Open in MetaMask / Copy link - [ ] Manual after Legal #15: complete EVM terms from that path; status API `signed_latest: true`; return URL is voting origin - [ ] Confirm Coolify still has `VITE_PLAYWRIGHT_E2E` unset
PlasticDigits commented 2026-08-30 17:57:28 +00:00 (Migrated from gitlab.com)

mentioned in commit 9f7885b453

mentioned in commit 9f7885b453a53c5071c28dc163d1fa745f1fd31c
PlasticDigits (Migrated from gitlab.com) merged commit 9f7885b453 into main 2026-08-30 17:57:29 +00:00
PlasticDigits commented 2026-08-31 09:10:05 +00:00 (Migrated from gitlab.com)

mentioned in issue #16

mentioned in issue #16
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/voting!27
No description provided.