-
Notifications
You must be signed in to change notification settings - Fork 24
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: update EIP712 related functions #78
Conversation
# Conflicts: # baseapp/block_gas_test.go # go.mod # x/staking/simulation/operations.go
7d17b9a
to
deac15d
Compare
77b549d
to
ed21e90
Compare
ed21e90
to
495785e
Compare
@@ -279,7 +297,7 @@ func (aa AccAddress) Bytes() []byte { | |||
|
|||
// String implements the Stringer interface. | |||
func (aa AccAddress) String() string { | |||
if aa.Empty() { | |||
if len(aa) == 0 { |
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.
To me, I always expect the String()
of AccAddress
return a valid format hex, "" is not expected in any 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.
Done
@@ -413,7 +431,7 @@ func (va ValAddress) Bytes() []byte { | |||
|
|||
// String implements the Stringer interface. | |||
func (va ValAddress) String() string { | |||
if va.Empty() { | |||
if len(va) == 0 { |
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.
so is ValAddress
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.
Done
The rest LGTM. |
Description
Adopt a new solution for EIP712 sign mode. Previously, we use amino codec to marshal the msg in txn and there're a lot of problems. Now we adopt proto codec. Besides that, all *Any types in msg will be treated as bytes rather than unpack it.
Rationale
The PR is bit hard to review, please focus the core modification:
Example
N/A
Changes
Notable changes: