aptos-core icon indicating copy to clipboard operation
aptos-core copied to clipboard

[Bug] Error running running a Typescript SDK test for submitting TransactionPayload transaction

Open chungquantin opened this issue 2 years ago • 1 comments

🐛 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")

chungquantin avatar Aug 17 '22 04:08 chungquantin

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.

github-actions[bot] avatar Nov 07 '22 06:11 github-actions[bot]

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.

github-actions[bot] avatar Dec 24 '22 01:12 github-actions[bot]