Skip to content

fix(sdk-core): decode accounts without created timestamps#51

Merged
bearcubsvet merged 1 commit into
masterfrom
fix/account-created-decoding
Jul 21, 2026
Merged

fix(sdk-core): decode accounts without created timestamps#51
bearcubsvet merged 1 commit into
masterfrom
fix/account-created-decoding

Conversation

@joshglogau

Copy link
Copy Markdown
Contributor

Summary

  • Allow API.v1.AccountObject.created to be omitted and expose it as TimePoint | null.
  • Preserve typed get_account decoding for valid system-account responses with reduced metadata.
  • Document the compatibility behavior and add a focused regression fixture.

Root cause

The Sandbox sysio account is valid, but its get_account response omits the legacy created field. The decoder treated that field as required and rejected the entire response.

Impact

SDK consumers can query these system accounts normally without falling back to untyped responses. Consumers must handle created === null when an RPC omits the timestamp.

Validation

  • pnpm --filter @wireio/sdk-core compile
  • pnpm --filter @wireio/sdk-core typecheck:strict-null
  • Focused ESLint checks
  • Chain.test.ts: 14 tests passed
  • Live Sandbox verification decoded sysio with created: null

@joshglogau
joshglogau marked this pull request as ready for review July 21, 2026 19:32
@joshglogau
joshglogau requested review from a team and bearcubsvet July 21, 2026 19:32
svetla-urt
svetla-urt previously approved these changes Jul 21, 2026
@bearcubsvet
bearcubsvet merged commit 0a669f3 into master Jul 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants