Skip to content

Commit e8085ab

Browse files
Merge pull request #15 from zksync-sdk/StanislavBreadless-batch-signed-tx-when-no-signature
Update SignedTransaction.java
2 parents 4dc88f0 + 4cb4910 commit e8085ab

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/main/java/io/zksync/wallet/SignedTransaction.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ public EthSignature[] getSignature() {
3636
}
3737

3838
public static <T extends ZkSyncTransaction> SignedTransaction<T> fromPair(Pair<T, EthSignature> tx) {
39-
return new SignedTransaction<T>(tx.getLeft(), new EthSignature[] {tx.getRight()});
39+
if (tx.getRight() == null) {
40+
return new SignedTransaction<T>(tx.getLeft(), null);
41+
} else {
42+
return new SignedTransaction<T>(tx.getLeft(), new EthSignature[] {tx.getRight()});
43+
}
4044
}
4145
}

0 commit comments

Comments
 (0)