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

Remove boxReferences from public Transaction constructor #399

Merged
merged 3 commits into from
Sep 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions src/main/java/com/algorand/algosdk/transaction/Transaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ public static Transaction createPaymentTransaction(Address sender, BigInteger fe
null,
null,
null,
null,
null);
}

Expand Down Expand Up @@ -407,7 +406,6 @@ public static Transaction createKeyRegistrationTransaction(Address sender, BigIn
null,
null,
null,
null,
null);
}

Expand Down Expand Up @@ -535,7 +533,6 @@ public static Transaction createAssetCreateTransaction(Address sender, BigIntege
null,
null,
null,
null,
null);
}

Expand Down Expand Up @@ -737,13 +734,16 @@ private Transaction(@JsonProperty("type") Type type,
convertToAddressList(accounts),
foreignApps,
foreignAssets,
boxReferences,
globalStateSchema,
applicationId,
localStateSchema,
clearStateProgram == null ? null : new TEALProgram(clearStateProgram),
extraPages
);
// Set fields _not_ exposed by public constructor. Needed because:
// * Adding parameters to a public constructor is a breaking API change.
// * To ensure JSON/msgpack serialization (via Jackson's ObjectMapper) works, must add `@JsonProperty` to _a_ constructor. Using a private constructor here to maintain API backwards compatibility.
if (boxReferences != null) this.boxReferences = boxReferences;
}

/**
Expand Down Expand Up @@ -795,7 +795,6 @@ public Transaction(
List<Address> accounts,
List<Long> foreignApps,
List<Long> foreignAssets,
List<BoxReference> boxReferences,
StateSchema globalStateSchema,
Long applicationId,
StateSchema localStateSchema,
Expand Down Expand Up @@ -846,7 +845,6 @@ public Transaction(
accounts,
foreignApps,
foreignAssets,
boxReferences,
globalStateSchema,
applicationId,
localStateSchema,
Expand Down Expand Up @@ -905,7 +903,6 @@ public Transaction(
List<Address> accounts,
List<Long> foreignApps,
List<Long> foreignAssets,
List<BoxReference> boxReferences,
StateSchema globalStateSchema,
Long applicationId,
StateSchema localStateSchema,
Expand Down Expand Up @@ -949,7 +946,6 @@ public Transaction(
if (accounts != null) this.accounts = accounts;
if (foreignApps != null) this.foreignApps = foreignApps;
if (foreignAssets != null) this.foreignAssets = foreignAssets;
if (boxReferences != null) this.boxReferences = boxReferences;
if (globalStateSchema != null) this.globalStateSchema = globalStateSchema;
if (applicationId != null) this.applicationId = applicationId;
if (localStateSchema != null) this.localStateSchema = globalStateSchema;
Expand Down