fix(swap): wrap-enter native routes GET /route/solve #1297

Merged
PlasticDigits merged 3 commits from issue/1218-wrap-enter-route-solve into main 2026-09-21 05:36:01 +00:00

Summary

  • Swap wrap-enter / unwrap-exit (uluna/uusd) maps wrap-mapper CW20s on the client, then quotes GET /api/v1/route/solve so LUNC→USTR can take wrap-then-cUSTC instead of a first-BFS ~100% hop.
  • executeNativeSwap uses this quote tick’s solver hops and strips all hybrid / book_input (H596-7). Direct 1:1 wrap/unwrap stays mapper-only. Indexer GET still 400s raw token_in=uluna.
  • Indexer skip-unusable fill: while filling top-K, skip ~100% ask-drain / implausible / zero-out paths (PATH_ENUM_POOL=32 structural; K stays 5). Do not bump MAX_PATH_CANDIDATES.

Fixes #1218

Test plan

  • make verify-issue-1218 (unit + indexer integration + docs; retest pass)
  • LocalTerra / LUNC→USTR Route is wrap-then-cUSTC (not LUNC→cLUNC→UST1→USTR ~100% hop); submit those hops
  • Direct LUNC→cLUNC wrap does not call /route/solve
  • Optional: VERIFY_ISSUE_1218_CHAIN=1 make verify-issue-1218 (wrap-swap.spec.ts E7/E8)
## Summary - Swap wrap-enter / unwrap-exit (`uluna`/`uusd`) maps wrap-mapper CW20s on the client, then quotes `GET /api/v1/route/solve` so LUNC→USTR can take wrap-then-cUSTC instead of a first-BFS ~100% hop. - `executeNativeSwap` uses this quote tick’s solver hops and strips all `hybrid` / `book_input` (H596-7). Direct 1:1 wrap/unwrap stays mapper-only. Indexer GET still 400s raw `token_in=uluna`. - Indexer skip-unusable fill: while filling top-K, skip ~100% ask-drain / implausible / zero-out paths (`PATH_ENUM_POOL`=32 structural; K stays 5). Do not bump `MAX_PATH_CANDIDATES`. Fixes https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/1218 ## Test plan - [x] `make verify-issue-1218` (unit + indexer integration + docs; retest pass) - [ ] LocalTerra `/` LUNC→USTR Route is wrap-then-cUSTC (not LUNC→cLUNC→UST1→USTR ~100% hop); submit those hops - [ ] Direct LUNC→cLUNC wrap does not call `/route/solve` - [ ] Optional: `VERIFY_ISSUE_1218_CHAIN=1 make verify-issue-1218` (`wrap-swap.spec.ts` E7/E8)
Map uluna/uusd to wrap CW20s before indexer solve, submit those hops
pool-only, and skip ~100% drain paths while filling top-K.
fix(hooks): only check new commits on first push of a branch
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
8b61b6c802
pre-push treated a zero remote OID as git rev-list of that SHA, which walks all ancestors.
Author
Owner

drain skip: no occupying job for rebase/fix-pr/CI-wait; remaining continue

drain skip: no occupying job for rebase/fix-pr/CI-wait; remaining continue
Merge origin/main into issue/1218-wrap-enter-route-solve
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful
47daabaca0
Keep wrap-enter GET /route/solve with skip-unusable top-K, remaining-failures Stay census, and combined pre-push.
PlasticDigits deleted branch issue/1218-wrap-enter-route-solve 2026-09-21 05:36:01 +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!1297
No description provided.