Summary
XLM amounts and ledger sequences are stored as BigInt in JavaScript but JSON.stringify throws on BigInt values by default. A shared serialization helper should convert BigInt fields to strings before they reach the response layer so the app never throws a silent serialization error.
Scope
- Add a
serializeBigInt(value: unknown): unknown helper that recursively converts BigInt values to strings in objects and arrays
- Use the helper in the response serializer for all endpoints that return price or amount fields
- Add unit tests for: top-level BigInt, nested BigInt in object, BigInt in array, non-BigInt value unchanged
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
XLM amounts and ledger sequences are stored as BigInt in JavaScript but JSON.stringify throws on BigInt values by default. A shared serialization helper should convert BigInt fields to strings before they reach the response layer so the app never throws a silent serialization error.
Scope
serializeBigInt(value: unknown): unknownhelper that recursively converts BigInt values to strings in objects and arraysAcceptance Criteria
ETA: 12 hours
Coordinate on Telegram