Skip to content

Commit f856192

Browse files
committed
rm assembleTransactionProcessor predicate null of cryptoKeyPair
1 parent 6081b6f commit f856192

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

sdk-transaction/src/main/java/org/fisco/bcos/sdk/transaction/manager/AssembleTransactionProcessor.java

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,7 @@ public TransactionResponse sendTransactionAndGetResponse(
244244
public TransactionResponse sendTransactionAndGetResponse(
245245
String to, String abi, String functionName, String data, CryptoKeyPair cryptoKeyPair)
246246
throws TransactionBaseException, ABICodecException {
247-
String signedData;
248-
if (cryptoKeyPair == null) {
249-
signedData = createSignedTransaction(to, data, this.cryptoKeyPair);
250-
} else {
251-
signedData = createSignedTransaction(to, data, cryptoKeyPair);
252-
}
247+
String signedData = createSignedTransaction(to, data, cryptoKeyPair);
253248
TransactionReceipt receipt = this.transactionPusher.push(signedData);
254249
try {
255250
return transactionDecoder.decodeReceiptWithValues(abi, functionName, receipt);
@@ -468,10 +463,6 @@ public String createSignedConstructor(String abi, String bin, List<Object> param
468463
public String createSignedConstructor(
469464
String abi, String bin, List<Object> params, CryptoKeyPair cryptoKeyPair)
470465
throws ABICodecException {
471-
if (cryptoKeyPair == null) {
472-
return createSignedTransaction(
473-
null, abiCodec.encodeConstructor(abi, bin, params), this.cryptoKeyPair);
474-
}
475466
return createSignedTransaction(
476467
null, abiCodec.encodeConstructor(abi, bin, params), cryptoKeyPair);
477468
}

0 commit comments

Comments
 (0)