Pre-launch: No risk disclaimers, NFA copy, or first-visit acknowledgement modal for mainnet deployment #138
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic#138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue Summary
The app currently has no "not financial advice" disclaimer, no risk warning copy, and no first-visit acknowledgement modal anywhere in the codebase. On localnet this is not a problem the
LOCALbadge makes the environment clear and no real funds are involved. However, when deployed to mainnet theLOCALbadge will not be present, and there will be no risk surfacing of any kind for real users trading real assets.Reproduction Steps
http://127.0.0.1:3000in a fresh browser profile (no wallet connected)/swap,/trade,/limits,/pool,/chartsExpected Behavior
At minimum, the app should surface:
LOCALbadge partially covers this but is easy to miss)Actual Behavior
LOCALbadge in the header is the only environment indicator — no equivalent warning exists for testnet or mainnet deployments where it would be absentEnvironment Details
localterra(local Docker)VITE_NETWORK=local npm run devWallet / Device Details
Severity / Impact
Pre-launch requirement. Not a bug on localnet the
LOCALbadge is sufficient there. On mainnet, the absence of any NFA disclaimer, risk warning, or first-visit acknowledgement is a standard gap that needs to be filled before public launch. Found under W1-C3 in #116 (Legal / risk surfacing).changed title from
No risk disclaimers, NFA copy, or first-visit acknowledgement LOCAL badge is the only environment indicatortoPre-launch: No risk disclaimers, NFA copy, or first-visit acknowledgement modal for mainnet deploymentchanged the description
mentioned in issue #116
mentioned in commit
e94479aae4Update (GitLab #138 — risk surfacing)
Implemented and merged to
main(e94479a).What changed
RiskAcknowledgementModal): NFA + risk bullets, checkbox + Continue only; no backdrop/Escape/header close dismiss. Persisted vialocalStorage+RISK_ACK_VERSIONinriskAcknowledgement.ts.EnvironmentRibbon+app-top-sticky): shows Local / Testnet / Mainnet with chain id and context copy on every route.LegalFooterNotice): desktop footer + mobile-only strip when the footer shell is hidden (max-width: 767px).dismissible+ optionalpanelClassName; Playwright setsVITE_PLAYWRIGHT_E2E=trueonwebServerso E2E is not blocked (documented indocs/frontend.md+skills/AGENTS_FRONTEND_RISK_DISCLAIMERS.md).localStoragekey string (false positive generic-api-key).Verification checklist
localStoragekeycl8y-dex-risk-ack: modal appears, cannot dismiss without checkbox + Continue.RISK_ACK_VERSIONis bumped or key removed.VITE_NETWORK=local/testnet/mainnet: ribbon + badge match expected chain labels.npm run test:unitinfrontend-dapp; Playwright navigation spec includes GL-138 strip + NFA assertion.@totdking please verify on a real build (without
VITE_PLAYWRIGHT_E2E) and confirm copy meets legal/pre-launch expectations. Leaving the issue open as requested.Verification checklist
localStoragekeycl8y-dex-risk-ack: modal appears, cannot dismiss without checkbox + Continue.RISK_ACK_VERSIONis bumped or key removed.VITE_NETWORK=local/testnet/mainnet: ribbon + badge match expected chain labels.npm run test:unitinfrontend-dapp; Playwright navigation spec includes GL-138 strip + NFA assertion.Issue noticed
The NFA disclaimer in the footer (
CL8Y DEX is experimental software. Nothing here is financial…) sometimes does not appear after navigating between routes. Waiting ~12 seconds causes it to appear without a page reload.Steps to reproduce
/swap→/trade→/tiers)Expected: NFA footer copy is visible immediately on all routes
Actual: NFA copy is intermittently missing after route changes, then appears after a delay
Root cause (suspected)
LayoutresetsrouteContentReadytofalseand re-registers theROUTE_CONTENT_READY_EVENTlistener on every pathname change. React runs child effects before parent effects, soRouteContentReadyMarker(child) can dispatch the event beforeLayout(parent) has re-attached its listener — the event is missed and the 12-second failsafe governs visibility instead.Affected routes: I saw it on a few tabs like the /tiers, /trade ; But assumption is all pages are affected
cc: @PlasticDigits
mentioned in commit
cec7707b22Fix: intermittent NFA footer after route changes (GitLab #138)
Merged to
mainincec7707(on top of currentmainafter #134 merge).Root cause
Layoutlistened forROUTE_CONTENT_READY_EVENTin auseEffectthat re-ran on everypathnamechange. React runs child effects before parent effects, soRouteContentReadyMarkercould dispatch the ready event beforeLayoutre-attached its listener — the signal was dropped and the 12s failsafe alone made NFA copy appear.What changed
windowcustom event withRouteContentReadyProvider+ pathname-scopedreadyForPathstate (frontend-dapp/src/contexts/RouteContentReadyContext.tsx).readyForPathwhenpathnamechanges so stale paths never satisfy the next route.RouteContentReadyMarkercallsuseMarkRouteContentReady()via context after lazy content mounts (LCP deferral for #179 unchanged; 12s failsafe kept).docs/frontend.md§ Risk surfacing — new NFA footer on navigation invariant; trade LCP section cross-linked.skills/AGENTS_FRONTEND_RISK_DISCLAIMERS.md,skills/AGENTS_FRONTEND_TRADE_INITIAL_LOAD.md.RouteContentReadyContext.test.tsx; E2E “NFA footer copy promptly after route changes” innavigation.spec.ts.Verification checklist
/→ Pool → Fee Tiers → Trade; NFA footer (“Nothing here is financial…”) visible within ~3s on each route (not ~12s)..app-mobile-legal-stripabove bottom nav./trade: workspace skeleton first; legal footer deferred until route mounts (#179).cd frontend-dapp && npm run test:unit— all pass.npx playwright test e2e/navigation.spec.ts -g "NFA footer"(LocalTerra +.env.local).@brouie please verify on a real build (without
VITE_PLAYWRIGHT_E2E) and confirm NFA is stable across tabs. Leaving the issue open until signed off.mentioned in issue #182
Verification checklist
/→ Pool → Fee Tiers → Trade; NFA footer (“Nothing here is financial…”) visible within ~3s on each route (not ~12s)..app-mobile-legal-stripabove bottom nav./trade: workspace skeleton first; legal footer deferred until route mounts (#179).cd frontend-dapp && npm run test:unit— all pass.npx playwright test e2e/navigation.spec.ts -g "NFA footer"(LocalTerra +.env.local).Issues noticed
Checklist 4:
File:
src/services/terraclassic/__tests__/cosmesPatch127.test.tsTest:KeplrExtension passes per-sign preferNoSetFee and post-sign fee guardSummary The cosmes patch integrity check is failing because the test references symbol names that were renamed in a subsequent patch update but the test assertions were never updated to match.
Why it fails The patch was refactored after the test was written. Three assertions now reference symbols that no longer exist in the patched file:
EXTENSION_SIGNED_FEE_MIN_PERCENT/ 2ncalculationgasFromAminoFeeulunaFromAminoFeegasFromDirectSignedAuthInfoBytesulunaFromDirectSignedAuthInfoBytesRecommended Fix Update the three failing assertions in
cosmesPatch127.test.tsto use the current symbol names and remove theEXTENSION_SIGNED_FEE_MIN_PERCENTassertion.Checklist 5 fails:
e2e-seed-hybrid-book.shcrashes withjqtype error when order book already has a head orderFile:
scripts/e2e-seed-hybrid-book.shSummary The seed script fails when the hybrid order book contract returns the head order ID as a bare number (
{"data": 13}). The script assumes the decoded payload is always an object with ahead_order_idfield and pipes the raw number into.head_order_id, whichjqcannot handle.Steps to reproduce
make start && make deploy-local)bash scripts/e2e-seed-hybrid-book.shExpected behaviour Script detects the existing head order, prints
"bid book already has head order X on <pair> — skipping"and exits cleanly with code0Actual behaviour
jq: error (at <stdin>:1): Cannot index number with string "head_order_id" Error: Command failed: bash scripts/e2e-seed-hybrid-book.shRoot cause
decode_smart_payloadcorrectly unwraps{"data": 13}to13, but the caller pipes that bare number intojq -r '.head_order_id // empty'. The contract returns the head order ID as a plain number, not as{"head_order_id": 13}.Affected line
HEAD_ID="$(decode_smart_payload "$RAW_HEAD" | jq -r '.head_order_id // empty')"Impact Blocks all Playwright E2E tests — the global setup crashes before any test runs
cc: @PlasticDigits
mentioned in commit
bd763beafaFix: GL-138 verification blockers (cosmes patch test + hybrid seed idempotency)
Merged to
maininbd763be.What changed
1.
cosmesPatch127.test.ts— patch integrity assertionsEXTENSION_SIGNED_FEE_MIN_PERCENT,gasFromAminoFee, andgasFromDirectSignedAuthInfoBytesstring checks that no longer match the patchedKeplrExtension.jssurface.meetsMinSignedRatio,ulunaFromAminoFee, andulunaFromDirectSignedAuthInfoBytesinstead (still guards post-sign fee validation afternpm ci/ patch-package).2.
scripts/e2e-seed-hybrid-book.sh— idempotent re-runOrderBookHeadreturns a bareu64on LCD ({"data":13}), not{ "head_order_id": 13 }.order_book_head_id_from_payloadso an existing head order is detected and the script exits 0 with the skip message instead of crashingjq.Docs / agent playbooks:
docs/testing.md(E2E invariant),skills/AGENTS_E2E_HYBRID_SWAP.md,skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_FRONTEND_RISK_DISCLAIMERS.mdcross-linked to this fix.Verification checklist
cd frontend-dapp && npm ci && npm run test:unit— all pass, includingcosmesPatch127.test.ts.bash scripts/e2e-seed-hybrid-book.shtwice; second run printsbid book already has head order … — skippingand exits 0.npx playwright test e2e/navigation.spec.ts -g "NFA footer"(LocalTerra +.env.local).make test-e2eor hybrid swap spec with chain up.@brouie please verify the unit test and hybrid seed re-run on your machine. Leaving the issue open until signed off.
mentioned in issue #139
Fix: shell tab nav — lazy page stuck after Pool click (GitLab #138 verification)
Merged to
maininf58cce5(followsbd763becosmes/seed fixes).Root cause
After
#182/AppShellNavLink, the URL and active nav updated on tab click, but<Outlet>could keep the prior lazy route mounted (Swap UI visible on/pool). GL-138 E2E “NFA footer promptly after route changes” and “navigates to Pool page” failed because assertions waited for Pool/Trade headings that never appeared.What changed
Layout.tsx:<Outlet key={location.pathname} />remounts matched lazy routes on every tab change.AppShellNavLink.tsx:Link+useMatchfor active styling; skip redundantnavigate()when already on target path.docs/frontend.md(NFA-on-nav + client-side tab invariants),skills/AGENTS_FRONTEND_SHELL_NAV.md,skills/AGENTS_FRONTEND_RISK_DISCLAIMERS.md.Verification checklist (GL-138 blockers — all clear)
cd frontend-dapp && npm ci && npm run test:unit— 594 passed (incl.cosmesPatch127.test.ts)bash scripts/e2e-seed-hybrid-book.sh×2 — second run skips with head order 1, exit 0npx playwright test e2e/navigation.spec.ts -g "NFA footer"— 2/2 passednpx playwright test e2e/navigation.spec.ts --project=e2e-smoke— 32/33 passed (remaining fail:#186mobile chip label — unrelated)npm run test:e2e— 92 passed (nav/regression suite green; remaining tx/wrap specs need separate triage)Local infra used: LocalTerra docker + host Postgres
:5432+ indexercargo runon:3001(docker Postgres blocked by port conflict — host DB is fine perdeploy-dex-local.sh).@brouie please spot-check tab navigation (Swap → Pool → Fee Tiers → Trade) and confirm NFA footer stays visible within ~3s on each route. Leaving issue open until signed off.
mentioned in commit
f58cce5603mentioned in commit
05a0e07a4eClosed — verification complete (GitLab #138)
Final verification run on
main(05a0e07) with LocalTerra + indexer +.env.local:npm run test:unit— 594 passed (incl.cosmesPatch127.test.ts)e2e-seed-hybrid-book.sh×2 — both exit 0 (skip on existing head order)-g "NFA footer"— 2/2 passed-g "navigates to Pool"— passedShipped on main
e94479a/ follow-upscec7707bd763becosmesPatch127.test.ts+ hybrid seed bareu64headf58cce5Outlet key={pathname}— Pool tab no longer stuck on Swap05a0e07docs/testing.md,docs/frontend.md,skills/AGENTS_FRONTEND_RISK_DISCLAIMERS.mdAgent playbooks:
skills/AGENTS_FRONTEND_RISK_DISCLAIMERS.md,skills/AGENTS_FRONTEND_SHELL_NAV.md,skills/AGENTS_TERRACLASSIC_GAS.md,skills/AGENTS_E2E_HYBRID_SWAP.md.mentioned in issue #337
mentioned in issue #358
mentioned in merge request !865
mentioned in issue #482
marked as related to #482
mentioned in issue #483
mentioned in issue #486
mentioned in merge request !1051
mentioned in issue #531
mentioned in issue #533
mentioned in issue #542
mentioned in issue #574
mentioned in issue #575
mentioned in issue #593
mentioned in issue #619
mentioned in issue #663
mentioned in issue #672
marked as related to #672
mentioned in merge request !1160
mentioned in issue #711
mentioned in issue #717