aptos-core
aptos-core copied to clipboard
[Bug] Error running running a Typescript SDK test for submitting TransactionPayload transaction
🐛 Bug
I use the submitTransaction
code in the example and it cause an error when running tests. Here is the link to the method https://github.dev/aptos-labs/aptos-core/blob/38b1b4ccb2e6ca5f891c985e8424944efec62739/ecosystem/web-wallet/src/core/mutations/transaction.ts
To reproduce
Code snippet to reproduce
async submitTransaction({
fromAccount,
payload,
}: {
fromAccount: AptosAccount;
payload: TransactionPayload;
}) {
try {
const txnRequest = await this.client.generateTransaction(
fromAccount.address(),
payload
);
const signedTxn = await this.client.signTransaction(
fromAccount,
txnRequest
);
const transactionRes = await this.client.submitTransaction(signedTxn);
await this.client.waitForTransaction(transactionRes.hash);
return transactionRes.hash;
} catch (error) {
console.error(error);
throw error;
}
}
Stack trace/error message
parse request payload error: Expected input type "TransactionSignature", found {"type":"ed_25519_signature","public_key":"0xc63536d746261865c8c8d4cdd87e54768a324937c6044ea360a54b246b64432a","signature":"0x677cc10c9d57cc9375e07d285d610de661bb8056f5715a151311ea3ac0ba5797270701279adcd665f579f7c15011681ac600f2df45db06cea6ad26dccd1a1b08"}. (occurred while parsing "SubmitTransactionRequest")
This issue is stale because it has been open 45 days with no activity. Remove the stale
label or comment - otherwise this will be closed in 15 days.
This issue is stale because it has been open 45 days with no activity. Remove the stale
label or comment - otherwise this will be closed in 15 days.