@@ -246,9 +246,9 @@ public TransactionResponse sendTransactionAndGetResponse(
246246 throws TransactionBaseException , ABICodecException {
247247 String signedData ;
248248 if (cryptoKeyPair == null ) {
249- signedData = createSignedTransaction (to , data , cryptoKeyPair );
250- } else {
251249 signedData = createSignedTransaction (to , data , this .cryptoKeyPair );
250+ } else {
251+ signedData = createSignedTransaction (to , data , cryptoKeyPair );
252252 }
253253 TransactionReceipt receipt = this .transactionPusher .push (signedData );
254254 try {
@@ -282,8 +282,19 @@ public TransactionResponse sendTransactionAndGetResponse(
282282 public TransactionResponse sendTransactionWithStringParamsAndGetResponse (
283283 String to , String abi , String functionName , List <String > params )
284284 throws ABICodecException , TransactionBaseException {
285+ return sendTransactionWithStringParamsAndGetResponse (
286+ to , abi , functionName , params , this .cryptoKeyPair );
287+ }
288+
289+ public TransactionResponse sendTransactionWithStringParamsAndGetResponse (
290+ String to ,
291+ String abi ,
292+ String functionName ,
293+ List <String > params ,
294+ CryptoKeyPair cryptoKeyPair )
295+ throws ABICodecException , TransactionBaseException {
285296 String data = abiCodec .encodeMethodFromString (abi , functionName , params );
286- return sendTransactionAndGetResponse (to , abi , functionName , data );
297+ return sendTransactionAndGetResponse (to , abi , functionName , data , cryptoKeyPair );
287298 }
288299
289300 @ Override
@@ -314,11 +325,8 @@ public TransactionResponse sendTransactionAndGetResponseByContractLoader(
314325 String functionName ,
315326 List <Object > funcParams )
316327 throws ABICodecException , TransactionBaseException {
317- return sendTransactionAndGetResponse (
318- contractAddress ,
319- contractLoader .getABIByContractName (contractName ),
320- functionName ,
321- funcParams );
328+ return sendTransactionAndGetResponseByContractLoader (
329+ contractName , contractAddress , functionName , funcParams , this .cryptoKeyPair );
322330 }
323331
324332 public TransactionResponse sendTransactionAndGetResponseByContractLoader (
0 commit comments