Skip to content

[REFACTOR] Normalize nullable bond interest payment date fields #1797

Description

@purplesmoke05

Background

Bond token responses currently represent unset interest_payment_date1 through interest_payment_date12 values as empty strings. The schema and DTO comments already note that these fields should move to required-nullable values, and the implementation still contains casts and normalization gaps caused by model and schema mismatch.

Description

Align the bond token model, DTO, and response contract so unset interest payment dates are represented consistently as null while keeping the keys present in the response. As part of the same cleanup, remove temporary casts that exist only because the IDX token model types do not yet match the API schema.

Scope

  • Update bond token serialization for interest_payment_date1 through interest_payment_date12.
  • Align app/model/blockchain/token.py and app/model/schema/token_bond.py around a required-nullable contract.
  • Normalize empty-string values coming from IDX data where needed.
  • Review and remove temporary casts that can disappear after type alignment.
  • Add or update tests for bonds with zero, partial, and full interest payment schedules.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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