fix txn signing map issue
@@ -97,9 +97,11 @@ const txn = algosdk.makePaymentTxnWithSuggestedParamsFromObject({
});
// Sign transaction
-// txns is an array of algosdk.Transaction
+// txns is an array of algosdk.Transaction like below
+// i.e txns = [txn, ...someotherTxns], but we've only built one transaction in our case
+const txns = [txn]
const txnsToSign = txns.map(txn => {
- const encodedTxn = Buffer.from(algosdk.encodeUnsignedTransaction(txn.txn)).toString("base64");
+ const encodedTxn = Buffer.from(algosdk.encodeUnsignedTransaction(txn)).toString("base64");
return {
txn: encodedTxn,
