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

Fails to parse ledger 94084608 due to empty Account #590

Closed
enforser opened this issue Feb 12, 2025 · 2 comments · Fixed by #594
Closed

Fails to parse ledger 94084608 due to empty Account #590

enforser opened this issue Feb 12, 2025 · 2 comments · Fixed by #594
Assignees
Labels
bug Something isn't working

Comments

@enforser
Copy link

enforser commented Feb 12, 2025

Transaction 4489EC9209A02221FBFADE49CFD09C93D46C2AF3B0878FC2A8767B2F21DFA9BB has an empty Account field being returned.

This fails to be parsed by xrpl4j: https://github.com/XRPLF/xrpl4j/blame/a69b5f1acdd93b54dc0c648685875e077cdae433/xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/Wrappers.java#L107

Here is what the empty account field looks like in the response from the node:

{
  validated: true
  ledger_index: 94084608
  close_time_iso: "2025-02-12T00:16:10Z"
  ledger_hash: "576A59C1EA928637915556DBF2BF9F6CC7ADAC942EAA6706BA91BB35751140A5"
  hash: "4489EC9209A02221FBFADE49CFD09C93D46C2AF3B0878FC2A8767B2F21DFA9BB"
  tx_json: {
    Account: ""
    Fee: "0"
    LedgerSequence: 94084608
    Sequence: 0
    SigningPubKey: ""
    TransactionType: "UNLModify"
    UNLModifyDisabling: 1
    UNLModifyValidator: "ED63CF929BE85B266A66584B3FE2EB97FC248203F0271DC9C833563E60418E7818"
  }
meta: { .. }
}
@sappenin
Copy link
Collaborator

Thanks for reporting this one, I'll take a look today and see if I can get a dot-release out to fix.

@sappenin sappenin self-assigned this Feb 12, 2025
@sappenin sappenin added the bug Something isn't working label Feb 12, 2025
sappenin added a commit that referenced this issue 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.
sappenin added a commit that referenced this issue Feb 18, 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.
@sappenin
Copy link
Collaborator

sappenin commented Feb 18, 2025

This should be fixed by v4.0.5. Please file another issue if you encounter any further problems.

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 a pull request may close this issue.

2 participants