we are working on crowdfunding application (GitHub - algorand/app-service)… while claiming the fund from an escrow account using logicsignature… we are getting null response.
CrowdFunding application issue
You may want to try upgrading the sdk versions. This was done in a hackathon a year ago, so some of the packages used may not be compatible anymore
I upgraded SDK version but still getting the same null response
This is my code:
LogicsigSignature lsig = new LogicsigSignature(fund.getEscrow().getTealProgram().getBytes(), null);
TransactionParametersResponse params = algodClient.TransactionParams().execute(headers,values).body();
PaymentTransactionBuilder claimTransactionBuilder = Transaction.PaymentTransactionBuilder()
.receiver(fund.getReceiverAddress())
.closeRemainderTo(fund.getReceiverAddress())
.sender(lsig.toAddress())
.amount(0);
Transaction paymentTransaction = claimTransactionBuilder.build();
SignedTransaction stx = Account.signLogicsigTransaction(lsig, paymentTransaction);
transactionEnvelope.setSignedTransaction(stx);
ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream();
for (TransactionEnvelope transactionEnvelope : transactionGroup.getTransactionEnvelopeList())
{
String teId = transactionEnvelope.getId();
TransactionEnvelope actual = this.transactionEnvelopeMap.get(teId);
byte[] transactionBytes = Encoder.encodeToMsgPack(actual.getSignedTransaction());
byteOutputStream.write(transactionBytes);
log.info("Submitting transaction: " + actual.getSignedTransaction().transactionID);
}
String[] headers = {"X-API-Key"};
String[] values = {"xI8HYsARcd9qQDfJCmFh39AfRNWu1f8hMZmC5ky5"};
String[] txHeaders = ArrayUtils.add(headers, "Content-Type");
String[] txValues = ArrayUtils.add(values, "application/x-binary");
byte groupTransactionBytes[] = byteOutputStream.toByteArray();
com.algorand.algosdk.v2.client.common.AlgodClient algodv2Client = getAlgodClientV2();
RawTransaction rawTransaction = algodv2Client.RawTransaction();
rawTransaction.rawtxn(groupTransactionBytes);
Response<PostTransactionsResponse> response = rawTransaction.execute(txHeaders,txValues);
System.out.println("reponse"+response);
PostTransactionsResponse id = response.body();
transactionGroup.setAlgorandTransactionId(id.txId);
log.info("successfully committed group transaction with transaction id " + id.txId + " " + transactionGroup);
waitForIndividualGroupTransactions( transactionGroup);
return id.txId;
Getting Null Response in rawTransaction.execute(txHeaders,txValues).body().
