Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the deserialization of some get_account responses #33

Merged
merged 3 commits into from
Sep 11, 2024

Conversation

ptagl
Copy link
Contributor

@ptagl ptagl commented Sep 11, 2024

This PR includes some fixes to prevent the crash of antelope-rs during the deserialization of some get_account responses. The affected fields are:

  • AccountVoterInfo/last_stake
  • AccountResourceLimit/available
  • AccountResourceLimit/max
  • AccountObject/core_liquid_balance

Some unit tests have been added to cover these edge cases.

MarcoOl94 and others added 2 commits September 11, 2024 17:58
- Added the conditional configuration of tests
- Split the account deserialization test into 3 smaller tests
- Switched to raw strings to keep JSON formatting and make the content more readable
@ptagl ptagl added this to the [M1] milestone Sep 11, 2024
The deserialization of the `core_liquid_balance` wasn't taking into account that such field could be omitted.
@ptagl ptagl changed the title Fix the deserialization of the get_account responses Fix the deserialization of some get_account responses Sep 11, 2024
Copy link
Member

@poplexity poplexity left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@ptagl ptagl merged commit c1760e6 into development Sep 11, 2024
8 checks 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