-
-
Notifications
You must be signed in to change notification settings - Fork 225
Conversation
realfishsam
commented
Jun 13, 2026
CI note from the autonomous code-fix launcher: the focused change in this PR is limited to sdks/typescript/pmxt/escrow.ts plus a regression in sdks/typescript/tests/hosted-dispatch.test.ts for #1050.
The red generated-sync checks are not caused by this focused escrow change. I inspected the failed logs:
Verify client.py methods are up-to-date/Verify client.ts methods are up-to-datewantnode sdks/*/scripts/generate-client-methods.jsand would remove or rewrite broad hosted-mode dispatch/client sections unrelated to this issue.Verify API_REFERENCE.md files are up-to-datewants broad docs/type reference churn for positions/balances/matching fields unrelated to escrow withdraw payload parity.
Per the PMXT generated-drift policy, I am keeping this PR scoped rather than folding unrelated generated drift into it. Static regression assertions over the touched files passed locally; Jest/tsc startup hung in this cron checkout with no output until timeout, while GitHub's TypeScript analysis passed.
realfishsam
commented
Jun 13, 2026
PR Review: PASS (NOT VERIFIED)
What This Does
Aligns TypeScript hosted escrow withdrawTx() request bodies with the Python SDK by adding token: "usdc" and the resolved user_address, and by omitting amount for non-amount actions. This matters because hosted escrow withdrawal requests need the wallet and token context to build the correct transaction.
Blast Radius
TypeScript SDK hosted escrow write path plus hosted-dispatch tests. No core sidecar/OpenAPI changes and no Python SDK changes.
Consumer Verification
Before (base branch):
The TypeScript SDK built the hosted request body as:
body: { action, amount: normalizedAmount }
For withdrawTx("claim"), normalizedAmount was null, and no wallet/token was sent.
After (PR branch):
The SDK resolves the wallet before dispatch and sends:
body: { action, token: "usdc", ...(normalizedAmount === undefined ? {} : { amount: normalizedAmount }), user_address: address, }
For claim/cancel actions, amount is omitted rather than sent as null.
Test Results
- Build: NOT VERIFIED; TypeScript SDK build failed before this PR-specific code on missing generated SDK artifacts:
Cannot find module '../generated/src/index.js'. - Unit tests: NOT VERIFIED;
tests/hosted-dispatch.test.tsfailed to collect for the same missing generated artifact. - Server starts: N/A
- E2E smoke: NOT RUN (hosted write request not sent)
Findings
No blocking findings.
PMXT Pipeline Check
- Field propagation (3-layer): N/A
- OpenAPI sync: N/A
- Financial precision: OK — bigint amount path still stringifies before request body inclusion.
- Type safety: OK from source review; full tsc blocked by missing generated artifacts.
- Auth safety: OK — wallet address is required via existing
resolveWalletAddress; no credentials logged.
Semver Impact
patch -- fixes request body parity for an existing SDK method.
Risk
I could not run the hosted-dispatch Jest test or TypeScript build in this cron image because sdks/typescript/generated/src/index.js is absent and SDK generation requires Java (java: not found). Verification is therefore source-level, not executable package-level.
Summary
client.escrow.withdrawTx()with Pythonwithdraw_tx()by includingtoken: "usdc"and the resolveduser_addressin the/v0/escrow/withdrawrequest body.amountfor non-request actions instead of sendingnull, matching the Python SDK wire shape.Fixes #1050
Test Plan
python3static regression assertions over the touched TypeScript source/test files passed.jest tests/hosted-dispatch.test.tsandtsc --noEmitcould not complete in this cron environment: Jest/Node startup hung until the scheduler timeout with no test output, including--showConfig.