feat(frontend): Swap URL sync, reverse quotes, Share, Create/Trade prefill (#713) #1200

Merged
PlasticDigits merged 3 commits from feat/713-swap-url-sync into main 2026-08-31 11:17:12 +00:00
PlasticDigits commented 2026-08-31 09:54:24 +00:00 (Migrated from gitlab.com)

Summary

  • Stacked on !1199 / #711. Keeps Swap /?from=&to= in sync after picker, flip, and amount (replace, not push).
  • Direct-pair reverse quotes via exactField=output and reverseSimulateSwap. Execute stays offer-in + min received. Multihop / wrap-mapper stay pay-sided.
  • Swap header Share (buildCanonicalSwapShareUrl) — Web Share on coarse+narrow, copy otherwise. Never window.location.href.
  • /create?a=&b= prefills listed or checksum custom (C542-11). /trade?from=&to= replaces to the unique factory pair path.

Closes #713.

Test plan

  • make verify-issue-713
  • make verify-issue-711 (inbound parse still green)
  • make verify-issue-542 (Create Pair catalog + prefill)
  • Swap: change tokens after /?inputCurrency= and confirm the bar rewrites to from/to without a history entry
  • Direct pair: exactField=output fills You Receive; You Pay is reverse sim; Swap still sends offer-in
  • Share copies canonical /?from=&to= (no leftover Uniswap keys)
  • /create?a=&b= prefills listed CW20s and does not auto-submit; hostile/native ignored
  • /trade?from=&to= navigates to /trade/{pair} when exactly one factory pair matches
  • Playwright e2e/swap-url-sync-713.spec.ts with a live VITE_FACTORY_ADDRESS (make deploy-local)
## Summary - Stacked on !1199 / #711. Keeps Swap `/?from=&to=` in sync after picker, flip, and amount (`replace`, not push). - Direct-pair reverse quotes via `exactField=output` and `reverseSimulateSwap`. Execute stays offer-in + min received. Multihop / wrap-mapper stay pay-sided. - Swap header Share (`buildCanonicalSwapShareUrl`) — Web Share on coarse+narrow, copy otherwise. Never `window.location.href`. - `/create?a=&b=` prefills listed or checksum custom (C542-11). `/trade?from=&to=` replaces to the unique factory pair path. Closes #713. ## Test plan - [ ] `make verify-issue-713` - [ ] `make verify-issue-711` (inbound parse still green) - [ ] `make verify-issue-542` (Create Pair catalog + prefill) - [ ] Swap: change tokens after `/?inputCurrency=` and confirm the bar rewrites to `from`/`to` without a history entry - [ ] Direct pair: `exactField=output` fills You Receive; You Pay is reverse sim; Swap still sends offer-in - [ ] Share copies canonical `/?from=&to=` (no leftover Uniswap keys) - [ ] `/create?a=&b=` prefills listed CW20s and does not auto-submit; hostile/native ignored - [ ] `/trade?from=&to=` navigates to `/trade/{pair}` when exactly one factory pair matches - [ ] Playwright `e2e/swap-url-sync-713.spec.ts` with a live `VITE_FACTORY_ADDRESS` (`make deploy-local`)
PlasticDigits commented 2026-08-31 11:14:17 +00:00 (Migrated from gitlab.com)

deleted the feat/711-swap-query-params branch. This merge request now targets the main branch

deleted the `feat/711-swap-query-params` branch. This merge request now targets the `main` branch
PlasticDigits commented 2026-08-31 11:16:22 +00:00 (Migrated from gitlab.com)

added 11 commits

  • fd907130...13d586b9 - 9 commits from branch main
  • 145c7d55 - Merge origin/main into feat/713-swap-url-sync.
  • d2ddde6f - Switch #678 Reduce to pay-sided when reverse quote is active.

Compare with previous version

added 11 commits <ul><li>fd907130...13d586b9 - 9 commits from branch <code>main</code></li><li>145c7d55 - Merge origin/main into feat/713-swap-url-sync.</li><li>d2ddde6f - Switch #678 Reduce to pay-sided when reverse quote is active.</li></ul> [Compare with previous version](/PlasticDigits/cl8y-dex-terraclassic/-/merge_requests/482/diffs?diff_id=1993906338&start_sha=fd907130cb8d53bf1d4690ae35ee5b570445c1ce)
PlasticDigits (Migrated from gitlab.com) merged commit cbd37cd870 into main 2026-08-31 11:17:12 +00:00
PlasticDigits (Migrated from gitlab.com) merged commit cbd37cd870 into main 2026-08-31 11:17:12 +00:00
PlasticDigits commented 2026-08-31 11:17:13 +00:00 (Migrated from gitlab.com)

mentioned in commit cbd37cd870

mentioned in commit cbd37cd8702be7dd1b9104e04d73cdf9b53d3324
PlasticDigits commented 2026-08-31 11:18:41 +00:00 (Migrated from gitlab.com)

mentioned in issue #714

mentioned in issue #714
PlasticDigits commented 2026-08-31 11:18:56 +00:00 (Migrated from gitlab.com)

mentioned in issue #711

mentioned in issue #711
PlasticDigits commented 2026-08-31 11:18:57 +00:00 (Migrated from gitlab.com)

mentioned in issue #713

mentioned in issue #713
PlasticDigits commented 2026-09-01 07:48:09 +00:00 (Migrated from gitlab.com)

mentioned in issue #716

mentioned in issue #716
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!1200
No description provided.