@@ -45,33 +45,33 @@ public static ArrayList<Bundle> createTransaction(UserObject user, ArrayList<Tra
45
45
public static ArrayList <Signature > signTransaction (UserObject user , ArrayList <Bundle > bundles ) {
46
46
return IotaFlashBridge .sign (user .getFlash ().getRoot (), user .getSeed (), bundles );
47
47
}
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
+ // }
75
75
76
76
public static void applyTransfers (UserObject user , ArrayList <Bundle > bundles ) {
77
77
FlashObject flash = IotaFlashBridge .applyTransfersToUser (user , bundles );
0 commit comments