ux: Terms hint says Keplr-only though Station / Cosmostation / Lunc Dash / Galaxy Station also sign #658
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#658
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?
Summary
Community report (anonymized): after connect, the Accept terms path tells the user to open the site in Keplr, even though multiple Terra Classic wallets can finish signing.
The DEX string is hardcoded:
Open this site in the Keplr browser to accept terms.That copy was added for #554 WC-M12 when the Legal portal could only call
window.keplr.signArbitrary. The portal has since shipped a full wallet matrix (cl8y-ecosystem-legal#11 / !731): Station, Keplr, Leap, Cosmostation, LUNC Dash, Galaxy Station. DEX Connect already offers Station / Keplr / Cosmostation / LuncDash / Galaxy Station (#566). Telling a Station or Lunc Dash user to switch to Keplr is now false and blocks the happy path.This issue is DEX retail copy + hint visibility + docs. Do not reimplement ADR-036 in this repo (C1). Portal leftover QA/ops stay on legal#13. Do not add Leap to the DEX Connect list (#159).
Current codebase
Hint surface
ConnectedTermsGatewraps<Outlet>after wallet connect (#517). It always mountsLegalKeplrInAppHintabove SDKTermsGate. Accept still navigates to Legalsign_urls.terra_classic— the DEX does not sign.legalKeplrInAppHint.ts:signedLatest === falseand!isBrowserWalletExtensionDetected(WalletName.KEPLR)(i.e. only!!window.keplr).LEGAL_KEPLR_INAPP_HINT= Open this site in the Keplr browser to accept terms.window.station/window.station.keplr) and Cosmostation (window.cosmostation?.providers?.keplr) do not hide the hint. A user already in Station or Cosmostation in-app still sees “use Keplr.”getKeplrLikeExtensionalready knows the three injectors. The hint ignores that helper and only checks Keplr.Connect list vs hint
resolveConnectWalletOptionsoffers:Leap is absent on the DEX (#159). The Legal portal still lists Leap (ustr-cmm matrix). DEX copy must not advertise Leap.
Docs locked to Keplr-only
WC-M12 / C1 still require the Keplr-browser sentence:
skills/AGENTS_FRONTEND_WALLETCONNECT_MOBILE.mdWC-M12skills/AGENTS_FRONTEND_CLICKWRAP.mdC1docs/frontend.mdWalletConnect table + Legal clickwrap C1Tests pin the old wording:
legalKeplrInAppHint.test.ts— show/hide only onhasKeplrExtensionConnectedTermsGate.test.tsx—toHaveTextContent(/Keplr browser/i)make verify-issue-554still requires WC-M12 + the hint unit tests. Update that target in the same MR so it asserts the new invariant, not the Keplr-only sentence.TermsGatealready receivesaccount={address}(Legal #13 integrator leftover does not apply to this DEX).Why this is needed
/sign/terra-classiccan sign with Station, Keplr, Cosmostation, LUNC Dash, and Galaxy Station (and Leap on the portal). DEX users who connected those wallets are told to abandon them.Constraints / guardrails
@plasticdigits/cl8y-clickwrap+ full navigation to the portal. Do not verifysignArbitraryhere.dex.cl8y.com,TERRA_CLASSIConly, fail closed, redirect allowlist, CSP, no admin secrets, Playwright hatch, NFA footer).window.keplr,window.station?.keplr, orwindow.cosmostation?.providers?.keplr(reusegetKeplrLikeExtension/isBrowserWalletExtensionDetectedfor Station + Cosmostation + Keplr). Do not treat'station' in windowalone as enough if the Keplr shim is missing.signed_latest.connect-srctohttps:.cl8y-dex-risk-ackas Legal proof.terra1…must not unlock this connected wallet.VITE_PLAYWRIGHT_E2E) still skips the gate; do not enable it on production.Relevant files
frontend-dapp/src/utils/legalKeplrInAppHint.ts,frontend-dapp/src/components/legal/LegalKeplrInAppHint.tsxfrontend-dapp/src/components/legal/ConnectedTermsGate.tsxfrontend-dapp/src/services/terraclassic/keplrLikeExtension.ts,frontend-dapp/src/services/terraclassic/walletExtensionInstall.tsfrontend-dapp/src/components/wallet/connectWalletOptions.tsfrontend-dapp/src/utils/detectWalletInAppBrowser.tsfrontend-dapp/src/index.css(.app-connected-terms-keplr-hint— rename class if the copy is no longer Keplr-only)frontend-dapp/src/utils/__tests__/legalKeplrInAppHint.test.ts,frontend-dapp/src/components/legal/__tests__/ConnectedTermsGate.test.tsxdocs/frontend.md(WC-M12, C1),skills/AGENTS_FRONTEND_CLICKWRAP.md,skills/AGENTS_FRONTEND_WALLETCONNECT_MOBILE.mdscripts/qa/verify-issue-554.sh(update WC-M12 assertion), newscripts/qa/verify-issue-<this>.sh+make verify-issue-<this>QA_TEMPLATE.md(add a multi-wallet terms-hint row next to 1.2.11 / 1.2.12)Recommended direction
Ship copy + visibility in one MR. Do not wait on Legal #13 manual QA.
shouldShowLegalWalletInAppHint/LEGAL_TERMS_WALLET_HINT. Detection input should behasSignerInjector(Keplr or Station shim or Cosmostation keplr provider), nothasKeplrExtensionalone.Open this site in your Terra Classic wallet browser to accept terms.orSign terms with the same wallet you connected (Station, Keplr, Cosmostation, Lunc Dash, or Galaxy Station).Name the DEX Connect set. Do not say “Keplr only” or “install Keplr.”walletType/ last-connected name is known, a one-wallet sentence is OK (Open this site in Station to accept terms.) plus the same hide rule when that wallet’s injector is already present. Fallback to the multi-wallet sentence when the type is unknown.TermsGateCTA still goes toterms.cl8y.com/sign/terra-classic?property=dex.cl8y.comwithaccount+ sanitizedredirect_uri. The hint is next-step copy, not a second signer.cl8y-ecosystem-legal.make verify-issue-<this>. Update #554’s verify script so it does not require the old Keplr-only sentence.Acceptance criteria
window.keplr: hint hidden (existing #554 behavior).window.station.keplronly (nowindow.keplr): hint hidden.window.cosmostation.providers.keplronly: hint hidden.signed_latest === trueor statusnull/ loading: hint hidden.make verify-issue-554still passes (updated assertions).#489: no extra essay on Swap after the user is signed.Test plan (all paths)
Unit — visibility
signedLatest: false, no injectorsignedLatest: false,window.keplrsignedLatest: false, Station keplr shim onlysignedLatest: false, Cosmostation keplr provider onlysignedLatest: true, any injectorsignedLatest: null(loading / error)'station' in windowbut nostation.keplrUnit — copy
/Keplr browser/as the sole instruction.window.keplr.Component —
ConnectedTermsGatewalletTypeluncdash / galaxystation / station / cosmostation / keplr) without injector: Accept visible + multi-wallet (or named) hint.window.keplr: Accept visible, hint absent.signed_latest: true: children render, no hint.Docs / verify scripts
AGENTS_FRONTEND_CLICKWRAP.mdC1 andAGENTS_FRONTEND_WALLETCONNECT_MOBILE.mdWC-M12 no longer mandate the Keplr-only sentence.docs/frontend.mdWC-M12 + C1 updated.scripts/qa/verify-issue-554.shgreps the new WC-M12 wording (or a stable token likeWC-M12+ “not Keplr-only”).make verify-issue-<this>runs the hint + gate tests + doc greps.Manual (columbus-5 /
https://dex.cl8y.com, unsigned wallet)Playwright
e2e/legal-clickwrap-517.spec.tsstill only proves the automation hatch (no Accept in smoke). Do not require live portal signing in CI.Test plan (attack / hack / abuse)
window.keplr = {}(or fake Station/Cosmostation) to hide the hintTermsGatestill queries Legal status. Fake injector cannot producesigned_latest. Portal / API still verify ADR-036.<a href>to a wallet download.redirect_urisanitizeRedirectUri+ portal allowlist unchanged. Hint must not append a user-controlled URL.terra1signswalletTypedangerouslySetInnerHTML.VITE_PLAYWRIGHT_E2E=trueon a production buildterms.cl8y.com.cl8y.comvsdex.cl8y.com)dex.cl8y.com.Verification criteria
Done when:
make verify-issue-554andmake verify-issue-<this>are green.Related: #517 clickwrap, #554 WC-M12 origin, #566 Station/Cosmostation WC, #159 no Leap, legal#11 portal matrix (closed), legal#13 portal QA leftovers (out of scope).
marked as related to #517
marked as related to #554
marked as related to #566
mentioned in commit
494c066f01mentioned in merge request !1157
mentioned in commit
c2a6592da5Merged to
mainvia !1157. Makefile help-line union with later verifies.Leftover: connected Legal hint still names DEX wallets (not Keplr-only) after frontend rebuild.
make verify-issue-658.mentioned in issue #673
mentioned in issue #706