Skip to content

[REFACTOR] Replace transfer approval empty-string sentinels with nullable datetimes #1796

@purplesmoke05

Description

@purplesmoke05

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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions