diff --git a/src/main/java/com/algorand/algosdk/transaction/Transaction.java b/src/main/java/com/algorand/algosdk/transaction/Transaction.java index c352b0f39..6078c9e5d 100644 --- a/src/main/java/com/algorand/algosdk/transaction/Transaction.java +++ b/src/main/java/com/algorand/algosdk/transaction/Transaction.java @@ -302,7 +302,6 @@ public static Transaction createPaymentTransaction(Address sender, BigInteger fe null, null, null, - null, null); } @@ -407,7 +406,6 @@ public static Transaction createKeyRegistrationTransaction(Address sender, BigIn null, null, null, - null, null); } @@ -535,7 +533,6 @@ public static Transaction createAssetCreateTransaction(Address sender, BigIntege null, null, null, - null, null); } @@ -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; } /** @@ -795,7 +795,6 @@ public Transaction( List
accounts, List foreignApps, List foreignAssets, - List boxReferences, StateSchema globalStateSchema, Long applicationId, StateSchema localStateSchema, @@ -846,7 +845,6 @@ public Transaction( accounts, foreignApps, foreignAssets, - boxReferences, globalStateSchema, applicationId, localStateSchema, @@ -905,7 +903,6 @@ public Transaction( List
accounts, List foreignApps, List foreignAssets, - List boxReferences, StateSchema globalStateSchema, Long applicationId, StateSchema localStateSchema, @@ -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;