Background
Transfer approval history still serializes missing datetimes as empty strings and keeps several fields nullable in ORM typing even though the API flow treats a subset of them as required. This mixes data-cleanup concerns with response formatting and makes the history payload harder to type correctly.
Description
Move transfer approval datetime handling to a consistent nullable representation, replace empty-string sentinels with null where appropriate, and align schema, ORM typing, and response builders around that contract. In the same pass, review which identifier fields should be non-null for persisted approval records and remove the remaining assertions that only exist to bridge the typing gap.
Scope
- Update transfer approval datetime serialization behavior and response typing.
- Review nullability for token_address, application_id, from_address, to_address, value, application_datetime, and application_blocktimestamp.
- Update IDXTransferApproval JSON helpers and transfer approval history endpoints.
- Add migration or backfill steps if existing rows need normalization.
- Add or update tests for pending, approved, cancelled, and partially populated approval records.
Background
Transfer approval history still serializes missing datetimes as empty strings and keeps several fields nullable in ORM typing even though the API flow treats a subset of them as required. This mixes data-cleanup concerns with response formatting and makes the history payload harder to type correctly.
Description
Move transfer approval datetime handling to a consistent nullable representation, replace empty-string sentinels with null where appropriate, and align schema, ORM typing, and response builders around that contract. In the same pass, review which identifier fields should be non-null for persisted approval records and remove the remaining assertions that only exist to bridge the typing gap.
Scope