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

Serialize non-absent AccountSet domain values #564

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

nkramer44
Copy link
Collaborator

To unset the Domain field on an AccountRoot, you have to set AccountSet.domain to an empty String. In xrpl4j, the Jackson ObjectMapper is configured globally to only include NON_EMPTY fields, which means that AccountSet.domain wasn't getting serialized to JSON if it was an empty string, which means that it didn't show up in the binary serialization of the transaction. Therefore, when developers correctly set AccountSet.domain to an empty string to clear the AccountRoot field, the transaction would end up being a no-op because Domain wasn't present in the serialized transaction.

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.02%. Comparing base (eaf05aa) to head (14ad851).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #564   +/-   ##
=========================================
  Coverage     92.02%   92.02%           
  Complexity     1841     1841           
=========================================
  Files           382      382           
  Lines          5106     5106           
  Branches        433      433           
=========================================
  Hits           4699     4699           
  Misses          272      272           
  Partials        135      135           

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

Copy link
Collaborator

@sappenin sappenin left a comment

Choose a reason for hiding this comment

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

LGTM!

@sappenin sappenin merged commit 9c4dfd2 into main Oct 29, 2024
21 checks passed
@sappenin sappenin deleted the nk/fix-account-set-domain branch October 29, 2024 16:44
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