Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signTransaction does not handle Tx v3 format #1165

Closed
Chralu opened this issue Nov 20, 2024 · 2 comments · Fixed by #1184
Closed

signTransaction does not handle Tx v3 format #1165

Chralu opened this issue Nov 20, 2024 · 2 comments · Fixed by #1184
Assignees
Labels
bug Something isn't working feat:RPC

Comments

@Chralu
Copy link
Collaborator

Chralu commented Nov 20, 2024

Describe the problem you discovered

Signing transactions through RPC does not handle TX v3 format.

Because of this, signing v3 transactions from libjs returns an 'Invalid format' error.

v2 format

{
  type: String,
  version: int,
  data: {
    // ...
    recipients: List<String>
  }
}

v3 format

{
  type: String,
  version: int,
  data: {
    // ...
    recipients: List<{
        action: String?,
        address: String?,
        args: List<{}>?
    }>
  }
}

Describe the solution you'd like

There are multiple solutions.

  1. accept v3 transactions only (acceptable because v2 isn't used anymore)
  2. add an automatic v2 to v3 conversion when parsing RPC command

Epic

No response

@Chralu Chralu added bug Something isn't working feat:RPC labels Nov 20, 2024
@Chralu Chralu self-assigned this Nov 20, 2024
@redDwarf03
Copy link
Member

And why we have SignTransactionConfirmationFormState naming in send_transaction rpc_command_receiver ?

@Chralu
Copy link
Collaborator Author

Chralu commented Nov 25, 2024

And why we have SignTransactionConfirmationFormState naming in send_transaction rpc_command_receiver ?

This looks like a mistake 😓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feat:RPC
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants