-
Notifications
You must be signed in to change notification settings - Fork 103
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
[x/group] Add amino JSON signing support and CLI #220
Conversation
* add remaining tests * removed logs * fixed tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, great job! Amino wiring looks good, but i'd like to see 1 test for peace of mind.
return nil, err | ||
} | ||
|
||
err = json.Unmarshal(contents, &members) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that group.Member
only has string subfields, encoding/json works here, but technically it should be clientCtx.JSONMarshaler.UnmarshalJSON, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the thing is that members
a just a regular slice, not proto.Message
so I guess we might need some Members
proto type in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yeah. That's annoying about protobuf, if you want an array of something you need to create a struct with an array subfield.
@@ -0,0 +1,2047 @@ | |||
package testsuite |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2k lines for a file is becoming hard to navigate. How about splitting into 2 tests files: txs and queries?
return testutil.WriteToNewTempFile(s.T(), tx).Name() | ||
} | ||
|
||
func TestIntegrationTestSuite(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it could be useful to add one test using --sign-mode=amino-json
, but to make sure the wiring works.
Co-authored-by: Amaury <amaury.martiny@protonmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
closes: #218
closes: #209 (not using ADR 031 approach for amino support)
closes: #197