You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SDK drift: Escrow.approveTx serializes amountWei as a JSON string; Escrow.approve_tx sends it as a JSON integer #1049
When a caller passes amountWei to Escrow.approveTx in TypeScript, it is serialized into the request body as a JSON string via .toString(). Python Escrow.approve_tx sends amount_wei as a JSON integer. The server receives different JSON types for the same field depending on which SDK is used.
Note: issue #1025 already tracks the SDK-level type mismatch (bigint vs int). This issue is specifically about the wire serialization — the JSON type that actually reaches the server.
amountWei.toString() produces a JSON string, e.g. "1000000000000000000".
Python SDK
sdks/python/pmxt/escrow.py:114–123
body: dict[str, Any] = {"token": token}
ifamount_weiisnotNone:
body["amount_wei"] =amount_wei# int → JSON number, e.g. 1000000000000000000
amount_wei is an int and is serialized as a JSON number.
Expected
Both SDKs should serialize amount_wei in the same JSON type (either both as string or both as integer) so the upstream /v0/escrow/approveTx endpoint receives a consistent payload regardless of which SDK is used.
Impact
If the server expects a JSON number, TypeScript callers will cause a type error or silent misparse. If the server expects a JSON string (common for amounts exceeding 64-bit float precision), Python callers may cause a parse error. The inconsistency makes the correct server expectation ambiguous and can produce intermittent, hard-to-diagnose failures.
Closing as duplicate of #1025. #1025's own body already fully describes and diagnoses the identical JSON string-vs-integer wire-format mismatch for amountWei on approve_tx/approveTx and recommends the same fix. Relevant context has been copied over.
Activity
Escrow.approveTxamountWeiis typedbigintin TypeScript butintin Python #1025realfishsam commentedon Jul 3, 2026
Closing as duplicate of #1025. #1025's own body already fully describes and diagnoses the identical JSON string-vs-integer wire-format mismatch for
amountWeionapprove_tx/approveTxand recommends the same fix. Relevant context has been copied over.Generated by Claude Code