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

Fixes #590 #594

Merged
merged 3 commits into from
Feb 18, 2025
Merged

Fixes #590 #594

merged 3 commits into from
Feb 18, 2025

Conversation

sappenin
Copy link
Collaborator

@sappenin sappenin commented Feb 16, 2025

Fixes #590 by removing the Account property from any incoming UnlModify JSON about to be deserialized. This fixes #590 because the JSON returned by the rippled/clio API v1 has a bug where the account value in UnlModify transactions is an empty string, when serialized throws an exception because empty string is not a valid Address. By removing the property from incoming JSON, the Java value for the Account property is always set to ACCOUNT_ZERO via a default method. Without this fix, the Account will also errantly end up in the `unknownFields map of the ultimate Java object, which is incorrect.

(Note the large line-count of this PR is due to the addition of a Livenet ledger JSON file used to validate this fix against real data)

Fixes #590 by removing the `Account` property from any incoming `UnlModify` JSON about to be deserialized. This fixes #590 because the JSON returned by the rippled/clio API v1 has a bug where the account value in `UnlModify` transactions is an empty string, when serialized throws an exception because empty string is not a valid Address. By removing the property from incoming JSON, the Java value for the `Account` property is always set to ACCOUNT_ZERO via a default method. Without this fix, the `Account` will also errantly end up in the `unknownFields map of the ultimate Java object, which is incorrect.
@sappenin sappenin added the bug Something isn't working label Feb 16, 2025
@sappenin sappenin self-assigned this Feb 16, 2025
Copy link

codecov bot commented Feb 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.02%. Comparing base (a69b5f1) to head (7012e7a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #594   +/-   ##
=========================================
  Coverage     92.01%   92.02%           
- Complexity     1848     1849    +1     
=========================================
  Files           383      383           
  Lines          5125     5128    +3     
  Branches        435      436    +1     
=========================================
+ Hits           4716     4719    +3     
  Misses          273      273           
  Partials        136      136           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sappenin sappenin merged commit 4a01fd4 into main Feb 18, 2025
21 checks passed
@sappenin sappenin deleted the df/fixes-590 branch February 18, 2025 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fails to parse ledger 94084608 due to empty Account
2 participants