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

Support for NetworkID #461

Merged
merged 6 commits into from
Aug 4, 2023
Merged

Support for NetworkID #461

merged 6 commits into from
Aug 4, 2023

Conversation

nkramer44
Copy link
Collaborator

@nkramer44 nkramer44 commented Jul 31, 2023

Adds support for the NetworkID transaction field. This field is Optional in Transaction, as it is only required on networks with ID > 1024.

Fixes #427

@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Merging #461 (5b6e7c9) into main (100a5b3) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main     #461      +/-   ##
============================================
+ Coverage     90.44%   90.46%   +0.02%     
- Complexity     1464     1468       +4     
============================================
  Files           285      287       +2     
  Lines          4164     4174      +10     
  Branches        339      339              
============================================
+ Hits           3766     3776      +10     
  Misses          277      277              
  Partials        121      121              
Files Changed Coverage Δ
...rpl/xrpl4j/model/client/serverinfo/ServerInfo.java 88.88% <ø> (ø)
...rg/xrpl/xrpl4j/model/transactions/Transaction.java 100.00% <ø> (ø)
...j/model/jackson/modules/NetworkIdDeserializer.java 100.00% <100.00%> (ø)
...l4j/model/jackson/modules/NetworkIdSerializer.java 100.00% <100.00%> (ø)
...a/org/xrpl/xrpl4j/model/transactions/Wrappers.java 89.55% <100.00%> (+0.48%) ⬆️

* No-args constructor.
*/
public NetworkIdSerializer() {
super(NetworkId.class, false);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
super(NetworkId.class, false);
super(NetworkId.class);

@@ -134,9 +136,10 @@ public void serializeAccountDelete() throws JsonProcessingException {
.sequence(UnsignedInteger.valueOf(2470665))
.destination(Address.of("rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"))
.destinationTag(UnsignedInteger.valueOf(13))
.networkId(NetworkId.of(UnsignedInteger.MAX_VALUE))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's add one test that is explicitly indicates (via its name) that the test is testing the absence of a network id on a particular transaction's binary encoding.

@nkramer44 nkramer44 merged commit 27cb9ce into main Aug 4, 2023
18 of 19 checks passed
@nkramer44 nkramer44 deleted the nk/network-id branch August 4, 2023 15:08
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.

Add network_id to ServerInfo respones
2 participants