Skip to content

Commit

Permalink
Remove de-duping via HashSet from accounts,foriegn apps, and foreign …
Browse files Browse the repository at this point in the history
…assets setters in MethodCallTransactionBuilder. Now set solely via lists to ensure stable ordering maintained. (#652)
  • Loading branch information
gmalouf authored Oct 25, 2023
1 parent f3e6dcd commit 408e186
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -105,7 +104,7 @@ public T signer(TxnSigner signer) {
@Override
public T accounts(List<Address> accounts) {
if (accounts != null)
this.foreignAccounts = new ArrayList<>(new HashSet<>(accounts));
this.foreignAccounts = new ArrayList<>(accounts);
else
this.foreignAccounts.clear();
return (T) this;
Expand All @@ -114,7 +113,7 @@ public T accounts(List<Address> accounts) {
@Override
public T foreignApps(List<Long> foreignApps) {
if (foreignApps != null)
this.foreignApps = new ArrayList<>(new HashSet<>(foreignApps));
this.foreignApps = new ArrayList<>(foreignApps);
else
this.foreignApps.clear();
return (T) this;
Expand All @@ -123,7 +122,7 @@ public T foreignApps(List<Long> foreignApps) {
@Override
public T foreignAssets(List<Long> foreignAssets) {
if (foreignAssets != null)
this.foreignAssets = new ArrayList<>(new HashSet<>(foreignAssets));
this.foreignAssets = new ArrayList<>(foreignAssets);
else
this.foreignAssets.clear();
return (T) this;
Expand Down

0 comments on commit 408e186

Please sign in to comment.