-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: .String()
panics when pubkey is set on a BaseAccount
#13838
Conversation
850c8fb
to
d22cd24
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #13838 +/- ##
=======================================
Coverage 56.74% 56.75%
=======================================
Files 637 637
Lines 54738 54740 +2
=======================================
+ Hits 31063 31069 +6
+ Misses 21154 21148 -6
- Partials 2521 2523 +2
|
I don't think String should be marshaling YAML at all. We should just let codegen generate String and get rid of these custom gogo overrides |
I think we cannot do this because of #10965. |
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.
LGTM, though i would completely clean up all YAML stuff on all accounts (base, module, vesting...). Maybe in a separate PR.
out, _ := acc.MarshalYAML() | ||
return out.(string) | ||
} | ||
|
||
// MarshalYAML returns the YAML representation of an account. | ||
func (acc BaseAccount) MarshalYAML() (interface{}, error) { |
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.
Should we also remove this method?
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.
Yes, this is sort of what #13850 is aimed to do.
(cherry picked from commit d9bc5ac)
Description
Discovered in #13742.
.String()
panics when pubkey is set on aBaseAccount
,Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change