fix(trade): unify market quotes with GET /route/solve (#501) #1041

Merged
PlasticDigits merged 1 commit from fix/501-trade-market-route-solve into main 2026-08-05 01:53:10 +00:00
PlasticDigits commented 2026-08-05 01:48:27 +00:00 (Migrated from gitlab.com)

Summary

  • Unify /trade Market default quoting with Swap: GET /api/v1/route/solve via shared quoteCw20ViaRouteSolve, submit solver hybrid params from indexerOperations.
  • Keep manual pool/book split under Trade Advanced (getDirectHybridBookSplit + POST / quoteDirectHybridSwap); empty book is no longer 100% book leg.
  • Document invariants and crosslink skills/docs for third-party agents (AGENTS_HYBRID_QUOTING, route display, ADR 0002, limit-orders).

Closes nothing — issue #501 stays open pending bot-runner path clarification. This MR only covers the approved scope: unify /trade market with Swap’s GET default.

Test plan

  • npm test -- src/utils/cw20RouteSolveQuote.test.ts
  • npm test -- src/components/trade/__tests__/TradeMarketOrderPanel.submitSnapshot.test.tsx (GET default + Advanced POST + #360/#414/#419)
  • Manual: /trade/<pair> Market → amount 1 → Network shows GET .../route/solve (not POST) with Advanced collapsed
  • Manual: Advanced → type book leg → quote uses POST /route/solve
  • Manual: Advanced → uncheck best execution → pool-only quote
  • Compare receive vs Swap for same pair/amount (solver split should align when both use GET)
## Summary - Unify `/trade` Market default quoting with Swap: `GET /api/v1/route/solve` via shared `quoteCw20ViaRouteSolve`, submit solver hybrid params from `indexerOperations`. - Keep manual pool/book split under Trade **Advanced** (`getDirectHybridBookSplit` + `POST` / `quoteDirectHybridSwap`); empty book is no longer 100% book leg. - Document invariants and crosslink skills/docs for third-party agents (`AGENTS_HYBRID_QUOTING`, route display, ADR 0002, limit-orders). Closes nothing — issue **#501** stays open pending bot-runner path clarification. This MR only covers the approved scope: unify `/trade` market with Swap’s GET default. ## Test plan - [x] `npm test -- src/utils/cw20RouteSolveQuote.test.ts` - [x] `npm test -- src/components/trade/__tests__/TradeMarketOrderPanel.submitSnapshot.test.tsx` (GET default + Advanced POST + #360/#414/#419) - [ ] Manual: `/trade/<pair>` Market → amount `1` → Network shows `GET .../route/solve` (not POST) with Advanced collapsed - [ ] Manual: Advanced → type book leg → quote uses `POST /route/solve` - [ ] Manual: Advanced → uncheck best execution → pool-only quote - [ ] Compare receive vs Swap for same pair/amount (solver split should align when both use GET)
project_80162261_bot_e646d24e9b17aa4b22040bfe08d3fd1c commented 2026-08-05 01:48:30 +00:00 (Migrated from gitlab.com)

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the [Cursor dashboard](https://www.cursor.com/dashboard/bugbot) to get automatic reviews on future PRs.
PlasticDigits commented 2026-08-05 01:48:37 +00:00 (Migrated from gitlab.com)

mentioned in issue #501

mentioned in issue #501
PlasticDigits commented 2026-08-05 01:53:10 +00:00 (Migrated from gitlab.com)

mentioned in commit 1ab04d6f58

mentioned in commit 1ab04d6f58af4dba001ff07d9723c41931607ec2
PlasticDigits (Migrated from gitlab.com) merged commit 1ab04d6f58 into main 2026-08-05 01:53:10 +00:00
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!1041
No description provided.