-
Notifications
You must be signed in to change notification settings - Fork 57
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
Add support for unknown transactions #569
Conversation
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/UnlModify.java
Outdated
Show resolved
Hide resolved
Codecov ReportAttention: Patch coverage is
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. |
There was a problem hiding this 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!
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/AmmBid.java
Outdated
Show resolved
Hide resolved
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/jackson/modules/TransactionDeserializer.java
Outdated
Show resolved
Hide resolved
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/AmmBid.java
Outdated
Show resolved
Hide resolved
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/Transaction.java
Outdated
Show resolved
Hide resolved
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/TransactionType.java
Show resolved
Hide resolved
xrpl4j-core/src/test/java/org/xrpl/xrpl4j/model/transactions/TransactionTypeTests.java
Show resolved
Hide resolved
xrpl4j-core/src/test/java/org/xrpl/xrpl4j/model/transactions/json/UnlModifyJsonTests.java
Outdated
Show resolved
Hide resolved
xrpl4j-core/src/main/java/org/xrpl/xrpl4j/model/transactions/UnlModify.java
Outdated
Show resolved
Hide resolved
@@ -62,7 +62,7 @@ static ImmutableUnlModify.Builder builder() { | |||
*/ | |||
@Override | |||
@JsonProperty("Account") | |||
@Value.Derived | |||
@Value.Default |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
related: #590
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch - I'll take a look at this one tonight.
Adds a new field to
Transaction
calledunknownFields
, which is annotated with@JsonAnySetter
. This tells Jackson to populateunknownFields
with any JSON fields that are unmapped in the immutable.This allow for two things:
UnknownTransaction
, which only has common fields +unknownFields
, which allows any version of xrpl4j that containsUnknownTransaction
to deserialize an unsupported transaction type from JSON