Security: pool provide/withdraw has no pre-sign summary card [SEC-I05] (F-03) #462
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#462
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
Swap operations render
SwapPreSubmitSummarybefore the Keplr wallet dialog, showing action, pair, amounts, slippage protection, min return, and chain label. Pool provide and withdraw operations have no equivalent pre-sign summary. A user providing or withdrawing liquidity sees only token amounts and a submit button -- the chain, pair contract, and action type are not surfaced in a structured card before the wallet dialog appears. This is inconsistent with the SEC-D11 anti-phishing pattern already applied to swaps.What Was Checked
frontend-dapp/src/pages/PoolPage.tsxlines 780-822 (provide): noSwapPreSubmitSummaryor equivalent component rendered before submission.frontend-dapp/src/pages/PoolPage.tsxlines 953-971 (withdraw): same absence.frontend-dapp/src/pages/SwapPage.tsxline 1700:SwapPreSubmitSummaryrendered conditionally before dispatch.frontend-dapp/src/components/swap/SwapPreSubmitSummary.tsx: chain label, action, and amounts all rendered.Expected (per checklist)
Pool provide and withdraw operations render a pre-sign summary card showing: action ("Provide Liquidity" or "Withdraw Liquidity"), pair, token amounts, and chain label, before the Keplr wallet dialog opens. Matches the SEC-D11 anti-phishing protection already applied to swaps and consistent with limit order pre-sign expectations.
Actual
No pre-sign summary card exists for provide or withdraw. Chain, pair, and action type are absent from the in-app flow before Keplr signing.
Suggested Fix
Add a
PoolPreSubmitSummarycomponent (or reuseSwapPreSubmitSummarywithactionLabel="Provide Liquidity"or"Withdraw Liquidity") toPoolPage.tsxprovide and withdraw flows. Show: action, pair tokens, amounts, and chain label before the Keplr dialog opens.Verification Checklist
PoolPreSubmitSummaryconfirming chain label and action type are renderedCc: @PlasticDigits
mentioned in issue #454
mentioned in issue #381
mentioned in merge request !990
Done. Pool provide/withdraw had no pre-sign summary — only token amounts + a submit button, with chain/action/pair absent before the Keplr dialog, unlike swaps.
Added a
PoolPreSubmitSummarycomponent (action, pair, amount line(s), chain label fromgetNetworkBadgeCopy().fullLabel) and wired it intoPoolPage: rendered before the provide button (gated on amountA && amountB, showing both deposit amounts) and before the withdraw button (gated on lpAmount, showing the LP burn amount). Matches the SEC-D11 anti-phishing anchor pattern.Tests: new component suite — provide (2 amount lines + chain), withdraw (LP line + chain), env-badge fallback — 3/0; PoolPage suite green, tsc clean. Source + unit verified here; the before-the-wallet-dialog placement/UX is a laptop browser-pass item.
MR !990, branch
qa/462-pool-presign-summary, commit on the branch. Needs review/merge @PlasticDigits — leaving open for verification.mentioned in commit
a19bb72260Fix needs review to reduce user cognitive overload
mentioned in commit
81fc27c822mentioned in merge request !997
mentioned in commit
b2b067ec8fmentioned in commit
772a7dec45Verification — #462 (SEC-I05 F-03) — PASS
Verified on
main@772a7dec(MR !990 + refine !997 merged). No repo changes required.Acceptance checklist
PoolPage.test.tsx— summarydata-testids appear when both amounts entered;compareDocumentPositionconfirms card is above submit. Live browser onhttp://127.0.0.1:5173/pool(LocalTerra + indexer +make dev): card visible after entering amounts, positioned above Provide button.pool-withdraw-pre-submit-summary-*); live browser confirms LP amount line + chain.PoolPreSubmitSummary(action + chain)npm run test:run -- src/components/pool/__tests__/PoolPreSubmitSummary.test.tsx→ 3/3 (provide 2-amount + chain, withdraw LP + chain, env badge fallback).PoolPage.test.tsx). Wallet/extension dialog only follows submit — chain (LocalTerraviagetNetworkBadgeCopy().fullLabel) and action labels are on the card first.Commands run
Implementation notes (reviewer feedback)
PlasticDigits requested reduced cognitive overload — addressed in
qa/462-pool-presign-summary-refine(!997): compact four-row card (action, pair, amount, chain) without swap-style intro paragraph; documented indocs/frontend.md§ Pool pre-sign summary andskills/AGENTS_FRONTEND_POOL_SIGNING_CONFIRMATION.md.Follow-ups
None blocking close. Optional: add a dedicated Playwright smoke asserting
pool-*-pre-submit-summaryon/pool(currently covered by Vitest only).mentioned in issue #480
marked as related to #480
mentioned in issue #531
mentioned in issue #533
mentioned in issue #559
mentioned in issue #660
mentioned in issue #661