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

Tuple's process and process_encode are not symmetrical #126

Open
valentunn opened this issue Sep 4, 2024 · 1 comment
Open

Tuple's process and process_encode are not symmetrical #126

valentunn opened this issue Sep 4, 2024 · 1 comment

Comments

@valentunn
Copy link

Hey, I am facing an issue when working with the type of the following structure:

def: {
                Composite: {
                  fields: [
                    {
                      name: null
                      type: 357
                      typeName: Vec<Asset>
                      docs: []
                    }
                  ]
                }
              }

The library interpets it as a 1-dimensonal Tuple. Tuple usually correponds to the [T]/(T) python objects but 1-dimensonal tuple performs this unwrapping during process which results in decoded value to be just T. On the other side, process_encode there is no such check which results in error when you try to pass instances received from decode to encode which becomes tough when working with dry_run apis when you need to pass complex structures back and worth

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
@valentunn and others