Skip to content

fix: backwards-compatible ctype data decoding - #703

Merged
rflechtner merged 6 commits into
developfrom
rf-ctype-backwards-compatibility
Jan 30, 2023
Merged

rflechtner merged 6 commits into
developfrom
rf-ctype-backwards-compatibility

Conversation

@rflechtner

@rflechtner rflechtner commented Jan 25, 2023 •

Copy link
Copy Markdown
Contributor

Makes sure the sdk still decodes CType records from before the chain upgrade to 0.9.0 / 0.8.5.
Adjust tests so that CType fetching is skipped where not available.

How to test:

We should no longer see the Invalid empty address passed errors in integration tests against latest (e.g., https://github.com/KILTprotocol/sdk-js/actions/runs/4003744234/jobs/6872161008).
Fetching CType data will still fail with Cannot fetch CType definitions on a chain that does not store the createdAt block.

Checklist:

  • I have verified that the code works
  • I have verified that the code is easy to understand
    • If not, I have left a well-balanced amount of inline comments
  • I have left the code in a better state
  • I have documented the changes (where applicable)

@rflechtner
rflechtner marked this pull request as ready for review January 25, 2023 19:35
@rflechtner
rflechtner requested a review from ntn-x2 January 25, 2023 20:15

@ntn-x2 ntn-x2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! The only thing that's not 100% clear is why we don't use the storage version number, that we decided to be 2 for the valid storage structure.

Comment thread packages/core/src/__integrationtests__/Ctypes.spec.ts Outdated
Comment thread packages/core/src/__integrationtests__/Ctypes.spec.ts Outdated
Comment thread packages/core/src/__integrationtests__/Ctypes.spec.ts
@rflechtner
rflechtner merged commit 11f46e3 into develop Jan 30, 2023
@rflechtner
rflechtner deleted the rf-ctype-backwards-compatibility branch January 30, 2023 17:01
@rflechtner rflechtner changed the title feat: backwards-compatible ctype data decoding fix: backwards-compatible ctype data decoding Feb 3, 2023
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.

2 participants