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

feat: add empty address check on authority field #4713

Merged
merged 3 commits into from
Sep 19, 2023

Conversation

colin-axner
Copy link
Contributor

Description

closes: #4667

Commit Message / Changelog Entry

type: commit message

see the guidelines for commit messages. (view raw markdown for examples)


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.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards and Go style guide.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

@colin-axner colin-axner marked this pull request as ready for review September 19, 2023 09:22
Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

Looks good to me, nice tests! Thanks 🙏

@codecov-commenter
Copy link

Codecov Report

Merging #4713 (1a9d1bc) into main (1283efb) will increase coverage by 0.04%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4713      +/-   ##
==========================================
+ Coverage   79.65%   79.70%   +0.04%     
==========================================
  Files         187      187              
  Lines       13195    13203       +8     
==========================================
+ Hits        10511    10523      +12     
+ Misses       2253     2251       -2     
+ Partials      431      429       -2     
Files Changed Coverage Δ
...27-interchain-accounts/controller/keeper/keeper.go 90.74% <100.00%> (+0.11%) ⬆️
.../apps/27-interchain-accounts/host/keeper/keeper.go 87.12% <100.00%> (+1.73%) ⬆️
modules/apps/transfer/keeper/keeper.go 93.28% <100.00%> (+1.45%) ⬆️
modules/core/keeper/keeper.go 92.00% <100.00%> (+0.33%) ⬆️

Copy link
Contributor

@chatton chatton left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@colin-axner colin-axner enabled auto-merge (squash) September 19, 2023 10:54
@colin-axner colin-axner merged commit 94d6b7c into main Sep 19, 2023
25 of 26 checks passed
@colin-axner colin-axner deleted the colin/4667-empty-authority branch September 19, 2023 11:05
@@ -52,6 +52,10 @@ func NewKeeper(
legacySubspace = legacySubspace.WithKeyTable(types.ParamKeyTable())
}

if strings.TrimSpace(authority) == "" {
panic(fmt.Errorf("authority must be non-empty"))
Copy link
Contributor

Choose a reason for hiding this comment

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

Was it really needed to use Errorf, since the string does not require formatting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate the authority field is non-empty in NewKeeper funcs
7 participants