Skip to content

Add helper for safely reading nested optional fields from creator response #365

@Chucks1093

Description

@Chucks1093

Summary
Accessing nested optional fields in creator response objects requires repeated null checks that clutter handler code. A small helper that safely reads a nested optional field and returns a typed default prevents null reference errors and reduces boilerplate.

Scope

  • add a helper that reads a nested optional field from a creator response object with a typed default
  • apply the helper to at least two existing nested field access sites
  • add a unit test covering present, null, and absent field cases

Acceptance Criteria

  • the helper returns the field value when present
  • the helper returns the typed default when the field is null or absent
  • a unit test covers all three cases

Contributor coordination: if you pick this up, reach out in Telegram for updates or clarification: https://t.me/accesslayerorg

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions