Skip to content

Tuple's process and process_encode are not symmetrical #126

Description

@valentunn

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions