Security: assert wrap pause and rate limit swap CTA copy and disabled state (#389) #920
No reviewers
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!920
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-389-wrap-pause-rate-limit-cta-tests"
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
Addresses GitLab #389 (SEC-A02): wrap-mapper pause and on-chain wrap rate limit states on
/now have isolated frontend tests that assert the exact submit button copy anddisabledstate — replacing the prior E12 regex that only checked visibility.SwapPage.test.tsx): separate cases mockqueryPausedStatevscheckRateLimitExceeded.wrap-swap.spec.ts): LCD route intercepts viae2e/helpers/wrap-mapper-lcd-mock.ts(no combinedRate Limit|Insufficient|Swapmatcher).docs/frontend.md,docs/testing.md,skills/AGENTS_FRONTEND_SWAP_SAFETY_CTA.md,frontend-dapp/e2e/README.md.Acceptance checklist
bash scripts/with-node.sh --cwd frontend-dapp -- npm run test:run -- src/pages/SwapPage.test.tsx -t "wrap mapper is paused"toBeDisabled)bash scripts/with-node.sh --cwd frontend-dapp -- npm run test:run -- src/pages/SwapPage.test.tsx -t "rate limit is exceeded"toBeDisabled)itblocks + separate Playwright specs (E12 vs wrap-pause describe)(needsmake deploy-local` env)Third-party verification
Playbook:
skills/AGENTS_FRONTEND_SWAP_SAFETY_CTA.mdSecurity review — MR !920
Commit reviewed:
8e0561c433bf115954659cf341e9451c80cb029eScope: SEC-A02 wrap pause / wrap rate-limit swap CTA tests and docs —
frontend-dapp/e2e/helpers/wrap-mapper-lcd-mock.ts,frontend-dapp/e2e/wrap-swap.spec.ts,frontend-dapp/src/pages/SwapPage.test.tsx, plusdocs/frontend.md,docs/testing.md,skills/AGENTS_FRONTEND_SWAP_SAFETY_CTA.md,frontend-dapp/e2e/README.md.Method: Full MR diff review; traced attacker-controlled inputs in added code to sinks; checked unchanged
SwapPage.tsx/wrapMapper.tsCTA gating only where needed to confirm no new exploit path. No prior security-review threads on this MR.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Added code is test/documentation only (Vitest mocks, Playwright LCD route interceptors, agent playbook). No production swap, wrap-mapper, or auth logic changed. The E2E helper (
decodeSmartQuery,page.route) runs only in Playwright CI/dev — not shipped to users; no injection, SSRF, secret leakage, or auth bypass introduced. On-chain pause/rate-limit enforcement remains unchanged and is the real control; this MR strengthens regression coverage for UI copy +disabledstate.Inline threads: none
mentioned in commit
7d8b4d1b41