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

launchpad: fix query params on governance votes querier #7624

Merged

Conversation

yun-yeo
Copy link
Contributor

@yun-yeo yun-yeo commented Oct 22, 2020

Description

Same issue with #7588 in master branch


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.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@yun-yeo yun-yeo mentioned this pull request Oct 22, 2020
9 tasks
@codecov
Copy link

codecov bot commented Oct 22, 2020

Codecov Report

Merging #7624 into launchpad/backports will increase coverage by 0.00%.
The diff coverage is n/a.

@@                 Coverage Diff                  @@
##           launchpad/backports    #7624   +/-   ##
====================================================
  Coverage                50.26%   50.27%           
====================================================
  Files                      338      338           
  Lines                    17560    17560           
====================================================
+ Hits                      8827     8828    +1     
+ Misses                    7940     7939    -1     
  Partials                   793      793           

@lgtm-com
Copy link

lgtm-com bot commented Oct 22, 2020

This pull request introduces 1 alert when merging eddee8c into 792c7bc - view on LGTM.com

new alerts:

  • 1 for Useless assignment to local variable

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

Minor change required. Has this been fixed on master?

rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
return
}

res, _, err = cliCtx.QueryWithData("custom/gov/votes", bz)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this error is not checked

Copy link
Contributor

Choose a reason for hiding this comment

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

It's checked in line 395 ⬇️

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, not necessarily - I think you're right Fede

Copy link
Contributor

Choose a reason for hiding this comment

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

This looks good

@alessio
Copy link
Contributor

alessio commented Oct 22, 2020

@fedekunze yep -> #7589

@alessio alessio added this to the 0.39.2 - The Launchpad Series milestone Oct 22, 2020
@alessio
Copy link
Contributor

alessio commented Oct 22, 2020

SRM approval is required: @clevinson @ethanfrey

Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time and contribute making Cosmos SDK Launchpad Series better.

Could you add a ChangeLog line please?

x/gov/client/rest/query.go Outdated Show resolved Hide resolved
@yun-yeo
Copy link
Contributor Author

yun-yeo commented Oct 22, 2020

Thanks for taking the time and contribute making Cosmos SDK Launchpad Series better.

Could you add a ChangeLog line please?

Also Done.

CHANGELOG.md Outdated Show resolved Hide resolved
@alessio alessio changed the title Bugfix gov votes querier to use proper params launchpad: fix query params on governance votes querier Oct 22, 2020
Copy link
Contributor

@alessio alessio left a comment

Choose a reason for hiding this comment

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

Awaiting approval from the other SRMs

Copy link
Contributor

@ethanfrey ethanfrey left a comment

Choose a reason for hiding this comment

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

Lgtm

rest.WriteErrorResponse(w, http.StatusBadRequest, err.Error())
return
}

res, _, err = cliCtx.QueryWithData("custom/gov/votes", bz)
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks good

@alessio alessio merged commit c4f4d03 into cosmos:launchpad/backports Oct 23, 2020
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.

8 participants