-
Notifications
You must be signed in to change notification settings - Fork 41
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
Refactor attribute validation #175
Conversation
Codecov Report
@@ Coverage Diff @@
## main #175 +/- ##
==========================================
- Coverage 46.06% 45.71% -0.36%
==========================================
Files 96 102 +6
Lines 7858 8161 +303
==========================================
+ Hits 3620 3731 +111
- Misses 3830 4015 +185
- Partials 408 415 +7
Continue to review full report at Codecov.
|
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 guess this is fine (consistency in naming), but ValidateBasic is a sdk.Msg
thing, not a general naming convention thing in Go.
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.
We need to add the stateful check on attribute length based on the current configured max value length. The validation that occurs in the types
folder must be stateless thus the "validatebasic" refactor...
Agreed ... the point of this issue originally was to address that the validation done in the attribute type could no longer be performed there due to the stateful property for the attribute length ... this validation has to be done in a keeper method. I think the point got lost a bit with the |
It's cool. Just a nit. |
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.
Nice, LGTM.
Description
Refactor existing Validate method in x/attribute/types/attribute.go to be ValidateBasic to follow sdk standard.
closes: #44
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes