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

Validation error when creating subaccount in Java #131

Closed
nicofuccella opened this issue Jul 5, 2021 · 1 comment
Closed

Validation error when creating subaccount in Java #131

nicofuccella opened this issue Jul 5, 2021 · 1 comment

Comments

@nicofuccella
Copy link

I'm trying to use the create_subaccount method from Java wrapper. This is the JSON I'm trying to use:

{ name: "test", type: “2of2” }

Unfortunately I get [Error: [json.exception.type_error.302] type must be number, but is object] during the execution. I tried to use a number like 0 or 1 for type and I get this error: [Error: [json.exception.type_error.302] type must be string, but is number].
What is a valid value for type?

@LeoComandini
Copy link
Contributor

As discussed privately, if you are using electrum based network, admissible types are:

  • p2sh-p2wpkh
  • p2wpkh
  • p2pkh

And changing the type to one of those fixes the issue.

Still the error is not nice and must be improved.
That should be addressed in an upcoming change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants