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

fix: errors with EIP712 signature #68

Merged
merged 3 commits into from
Dec 20, 2022
Merged

fix: errors with EIP712 signature #68

merged 3 commits into from
Dec 20, 2022

Conversation

pythonberg1997
Copy link
Contributor

Description

When there are types.Any in the msg, some errors will happened with EIP712 signature.

Rationale

N/A

Example

N/A

Changes

Add additional operations for types.Any

fieldType = reflect.TypeOf(anyWrapper.Value)
field = reflect.ValueOf(anyWrapper.Value)

// then continue as normal
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest add comments above if condition to explain how we deal with type any, no this comment.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, more comments for others to understand this part.

@@ -323,17 +323,27 @@ func traverseFields(
fieldType := t.Field(i).Type
fieldName := jsonNameFromTag(t.Field(i).Tag)

if fieldName == "" {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some comments here as well, thanks.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Find and summary the current structure that do not have fieldName .

@unclezoro unclezoro merged commit 344fb72 into develop Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants