feat(swap): make receive amounts editable on native and client routes #1374
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!1374
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-1256-receive-input"
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?
What
Swap previously made You Receive editable only for direct CW20 pairs. It now accepts receive targets on native/wrapped, mapper-only wrap/unwrap, and client multi-hop routes, then sizes the pay offer using pair/router reverse simulation or shared integer fee/tax inverses.
Submission uses that offer through the forward quote and minimum-receive checks. Direct reverse swaps include a forward-quote minimum, community-tax receive targets are net with pre-tax execution floors, and stale/failed reverse offers cannot submit. Indexer-only routes without client operations silently restore pay-sided intent. No indexer exact-out endpoint is introduced.
Why
Closes #1256. Investigated the issue and its comments (none present); the direct-only implementation on main did not cover this product slice.
The shared wrap inverse also serves invoice payment, including integer skim rounding. Native output inversion accounts for mapper unwrap fee, burn-tax rate, and tax cap. Forward/reverse router quotes carry matching trader/sender context.
Testing
make verify-issue-1256: repeated PASS, 216 unit/RTL tests plus 9 Chromium tests with five workers;PASS=5 FAIL=0 SKIP=0.make verify-issue-713,make verify-issue-678, andmake verify-issue-512: repeated PASS. The legacy #713 live-chain browser substep skips without a deployed factory/environment; the new #1256 browser suite runs using mocked LCD.Liquidity add/remove and production deployment are outside this frontend receive-sizing scope. No migration or production environment change is required.
Issue acceptance checklist
Agent review instructions
Check out this head, record
git rev-parse HEAD, and follow the review checklist. Runmake verify-issue-1256, then the #713/#678/#512 verifiers, frontend lint, and chrome nesting check. Inspect connected submit assertions to confirm pay raw equals the reverse offer and minimum receive uses the correct pre-tax base.Agents may mark truly unavailable items SKIP with a concrete reason and remaining scope, while marking the overall review PASS with explicit skips when completed checks pass. Never check off an unexecuted criterion or turn a failed assertion into PASS. The new verifier reports PASS/FAIL/SKIP separately and supports documented skip-reason variables. Retest affected checks after corrections.
Invariants and code map: R1256 / Q713-4 / Q711-6, third-party agent playbook. Recorded implementation evidence: verification.md.
Checklist