Skip to content

Commit 3e22e98

Browse files
committed
removed unused code
1 parent 117002f commit 3e22e98

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

src/main/java/iotaFlashWrapper/Helpers.java

+27-27
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,33 @@ public static ArrayList<Bundle> createTransaction(UserObject user, ArrayList<Tra
4545
public static ArrayList<Signature> signTransaction(UserObject user, ArrayList<Bundle> bundles) {
4646
return IotaFlashBridge.sign(user.getFlash().getRoot(), user.getSeed(), bundles);
4747
}
48-
49-
public static ArrayList<Bundle> appliedSignatures(ArrayList<Bundle> bundles, ArrayList<Signature> signatures) {
50-
ArrayList<Bundle> clonedBundles = clone(bundles);
51-
bundles.clone();
52-
53-
for (int i = 0; i < bundles.size(); i++) {
54-
Signature sig = signatures.get(i);
55-
Bundle b = bundles.get(i);
56-
if (sig == null) {
57-
continue;
58-
}
59-
60-
ArrayList<Transaction> transactions = b.getBundles();
61-
String addy = transactions.stream().filter(tx -> tx.getValue() < 0).findFirst().get().getAddress();
62-
List<Transaction> tmp = transactions.stream()
63-
.filter(tx -> tx.getAddress().equals(addy))
64-
.collect(Collectors.toList());
65-
66-
tmp = tmp.subList(sig.getIndex(), sig.getIndex() + sig.getSignatureFragments().size());
67-
68-
for (int j = 0; j < tmp.size(); j++) {
69-
tmp.get(j).setSignatureFragments(sig.getSignatureFragments().get(j));
70-
}
71-
}
72-
73-
return clonedBundles;
74-
}
48+
//
49+
// public static ArrayList<Bundle> appliedSignatures(ArrayList<Bundle> bundles, ArrayList<Signature> signatures) {
50+
// ArrayList<Bundle> clonedBundles = clone(bundles);
51+
// bundles.clone();
52+
//
53+
// for (int i = 0; i < bundles.size(); i++) {
54+
// Signature sig = signatures.get(i);
55+
// Bundle b = bundles.get(i);
56+
// if (sig == null) {
57+
// continue;
58+
// }
59+
//
60+
// ArrayList<Transaction> transactions = b.getBundles();
61+
// String addy = transactions.stream().filter(tx -> tx.getValue() < 0).findFirst().get().getAddress();
62+
// List<Transaction> tmp = transactions.stream()
63+
// .filter(tx -> tx.getAddress().equals(addy))
64+
// .collect(Collectors.toList());
65+
//
66+
// tmp = tmp.subList(sig.getIndex(), sig.getIndex() + sig.getSignatureFragments().size());
67+
//
68+
// for (int j = 0; j < tmp.size(); j++) {
69+
// tmp.get(j).setSignatureFragments(sig.getSignatureFragments().get(j));
70+
// }
71+
// }
72+
//
73+
// return clonedBundles;
74+
// }
7575

7676
public static void applyTransfers(UserObject user, ArrayList<Bundle> bundles) {
7777
FlashObject flash = IotaFlashBridge.applyTransfersToUser(user, bundles);

0 commit comments

Comments
 (0)