Skip to content

Revert automatic V3 routing (#105) - #108

Merged
kartojal merged 1 commit into
mainfrom
revert/pr-105-automatic-v3-routing
Sep 23, 2026
Merged

kartojal merged 1 commit into
mainfrom
revert/pr-105-automatic-v3-routing

Conversation

@kartojal

@kartojal kartojal commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Reverts #105.


Note

Medium Risk
Changes default order signing/routing for V2 position IDs from forced V3 to server /version, which can cause mismatches or failed posts if the server version differs from what those assets require.

Overview
Reverts automatic Exchange V3 selection for protocol V2 position token IDs. Limit and market orders no longer infer exchange version from the token ID; when options.version is omitted, the client uses the cached /version response for every asset (same as legacy CTF routing).

Removes isV2PositionId and src/protocol.ts, drops resolveOrderVersion, and simplifies _retryOnVersionUpdate so migration retries are not skipped for V2 positions or explicit versions. README and CreateOrderOptions.version docs about auto-V3 are removed; related tests in orderVersion.test.ts and protocol.test.ts are deleted.

Callers that need Exchange V3 must pass version: 3 (or use createExchangeV3OrderFromAmounts where applicable).

Reviewed by Cursor Bugbot for commit 02a0d27. Bugbot is set up for automated code reviews on this repo. Configure here.

@kartojal
kartojal requested a review from a team as a code owner September 23, 2026 11:31
@kartojal
kartojal merged commit 1210b46 into main Sep 23, 2026
5 checks passed
@kartojal
kartojal deleted the revert/pr-105-automatic-v3-routing branch September 23, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants