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

Bugfix gov votes querier to use proposal params for proposal query #7589

Merged
merged 4 commits into from
Oct 20, 2020

Conversation

yun-yeo
Copy link
Contributor

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

Description

The gov proposal querier in votes query interface should use QueryProposalParams instead of QueryProposalVotesParams.

closes: #7588


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

@codecov
Copy link

codecov bot commented Oct 19, 2020

Codecov Report

Merging #7589 into master will increase coverage by 3.63%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master    #7589      +/-   ##
==========================================
+ Coverage   50.58%   54.21%   +3.63%     
==========================================
  Files         451      611     +160     
  Lines       28389    38464   +10075     
==========================================
+ Hits        14361    20854    +6493     
- Misses      12575    15502    +2927     
- Partials     1453     2108     +655     

Comment on lines 359 to 363
bz, err = clientCtx.LegacyAmino.MarshalJSON(params)
if rest.CheckBadRequestError(w, err) {
return
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I would move this block in the else statement as that's the only place we need it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

Copy link
Contributor

@amaury1093 amaury1093 left a comment

Choose a reason for hiding this comment

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

ah yeah, nice catch. utACK

@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Oct 20, 2020
@mergify mergify bot merged commit 1542ecb into cosmos:master Oct 20, 2020
@yun-yeo yun-yeo mentioned this pull request Oct 21, 2020
9 tasks
@yun-yeo yun-yeo changed the title Bugfix gov votes querier to use votes params Bugfix gov votes querier to use proposal params for proposal query Oct 21, 2020
alessio pushed a commit that referenced this pull request Oct 23, 2020
From: #7589
Closes: #7588
Thanks: @YunSuk-Yeo 

Co-authored-by: Alessio Treglia <alessio@tendermint.com>
clevinson pushed a commit that referenced this pull request Oct 29, 2020
* bugfix gov votes querier to use votes params

* move partially used statement to the proper block

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug - wrong query params on governance votes querier
5 participants