Skip to content

Add support for unknown transactions#569

Merged
sappenin merged 12 commits intomainfrom
nk/unknown-transaction
Feb 3, 2025
Merged

Add support for unknown transactions#569
sappenin merged 12 commits intomainfrom
nk/unknown-transaction

Conversation

@nkramer44
Copy link
Collaborator

Adds a new field to Transaction called unknownFields, which is annotated with @JsonAnySetter. This tells Jackson to populate unknownFields with any JSON fields that are unmapped in the immutable.

This allow for two things:

  1. Out of the box support for any new transaction fields that the current version/an old version of xrpl4j doesn't support
  2. The introduction of UnknownTransaction, which only has common fields + unknownFields, which allows any version of xrpl4j that contains UnknownTransaction to deserialize an unsupported transaction type from JSON

@codecov
Copy link

codecov bot commented Nov 3, 2024

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.01%. Comparing base (613339d) to head (51589f4).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
.../xrpl4j/model/transactions/UnknownTransaction.java 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #569      +/-   ##
============================================
- Coverage     92.02%   92.01%   -0.01%     
- Complexity     1843     1848       +5     
============================================
  Files           382      383       +1     
  Lines          5115     5125      +10     
  Branches        435      435              
============================================
+ Hits           4707     4716       +9     
- Misses          272      273       +1     
  Partials        136      136              

☔ 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 -- mostly cleanup and docs suggestions, but otherwise good to go. Thanks for adding support here!

@sappenin sappenin merged commit a69b5f1 into main Feb 3, 2025
19 of 21 checks passed
@sappenin sappenin deleted the nk/unknown-transaction branch February 3, 2025 21:14
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