feat(frontend): 25/50/75/100% amount fraction presets (#303) #759
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!759
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "qa/303-fraction-buttons"
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?
Follow-up on #303. The shared
AmountBalanceActionsonly exposedMax(+50%on pool). Added optional fraction-preset buttons (default 25/50/75/100%) — backward-compatible (existingshowHalf/onMaxcallers unchanged) — each applying its fraction to the same gas-adjusted spendableMaxuses, via exact bigint math (no float drift). Wired on the swap You Pay field and the trade/limit escrow amount field; pool keeps its own Max + 50%. tsc -b clean. Browser verification is totdking's. No closing keyword.mentioned in issue #303
Security review (automated)
Commit reviewed:
842dedc021f92c1018f2cdabbf91b499a9e40676Scope: Frontend-only — optional 25/50/75/100% fraction presets in
AmountBalanceActions, wired on swap “You pay” and limit-order escrow amount (AmountBalanceActions.tsx,SwapPage.tsx,LimitOrderEscrowAmountField.tsx).Outcome:
FINDINGS: 0medium or higher.Inline threads: None.
Notes
spendableRawas Max, with floor bigint math ((spendableRaw * pct) / 100n) andfromRawAmount— no new attacker-controlled inputs; default presets are fixed constants.onFractionhandlers mirror existing Max wiring (setInputAmount/onAmountChange). ClearingshowImpactConfirmon fraction click matches manual amount edits and still requires a fresh two-step confirm when price impact remains above the threshold.Security review: no medium+ findings on this diff.
mentioned in commit
9f0babe556mentioned in merge request !770