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

Avoid double voting with same option #1728

Merged
merged 4 commits into from
Dec 11, 2018
Merged

Conversation

sabau
Copy link
Contributor

@sabau sabau commented Dec 10, 2018

Description:

  • getVotes has been used instead of getVote as the latter throws error if the specified address did't vote yet
  • disable the already voted option
  • fixed setProposalVotes action parameters

Closes #1683

❤️ Thank you!


  • Added entries in CHANGELOG.md with issue # and GitHub username
  • Reviewed Files changed in the github PR explorer

- getVotes has been used instead of getVote as the latter throws error if the specified address did't vote yet
- disable the already voted option

Signed-off-by: Karoly Albert Szabo <[email protected]>
@sabau sabau requested review from faboweb and nylira as code owners December 10, 2018 16:09
Signed-off-by: Karoly Albert Szabo <[email protected]>

# Conflicts:
#	test/unit/specs/components/governance/PageProposal.spec.js
#	test/unit/specs/store/governance/votes.spec.js
@codecov
Copy link

codecov bot commented Dec 10, 2018

Codecov Report

Merging #1728 into develop will decrease coverage by 0.23%.
The diff coverage is 28.57%.

@@            Coverage Diff             @@
##           develop   #1728      +/-   ##
==========================================
- Coverage    97.74%   97.5%   -0.24%     
==========================================
  Files          102     102              
  Lines         2083    2088       +5     
  Branches        93      93              
==========================================
  Hits          2036    2036              
- Misses          38      41       +3     
- Partials         9      11       +2
Impacted Files Coverage Δ
...p/src/renderer/components/governance/ModalVote.vue 100% <ø> (ø) ⬆️
...rc/renderer/components/governance/PageProposal.vue 89.13% <0%> (-10.87%) ⬇️
app/src/renderer/vuex/modules/governance/votes.js 100% <100%> (ø) ⬆️

@codecov
Copy link

codecov bot commented Dec 10, 2018

Codecov Report

Merging #1728 into develop will increase coverage by <.01%.
The diff coverage is 100%.

@@             Coverage Diff             @@
##           develop    #1728      +/-   ##
===========================================
+ Coverage    97.74%   97.74%   +<.01%     
===========================================
  Files          102      102              
  Lines         2083     2085       +2     
  Branches        93       93              
===========================================
+ Hits          2036     2038       +2     
  Misses          38       38              
  Partials         9        9
Impacted Files Coverage Δ
...p/src/renderer/components/governance/ModalVote.vue 100% <ø> (ø) ⬆️
app/src/renderer/connectors/lcdClientMock.js 99.19% <ø> (-0.01%) ⬇️
...rc/renderer/components/governance/PageProposal.vue 100% <100%> (ø) ⬆️
app/src/renderer/vuex/modules/governance/votes.js 100% <100%> (ø) ⬆️

- fixed lcdClientMock
- added disable check for ModalVote

Signed-off-by: Karoly Albert Szabo <[email protected]>
Copy link
Contributor

@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.

thanks ! some minor comments

app/src/renderer/connectors/lcdClientMock.js Outdated Show resolved Hide resolved
test/unit/specs/store/governance/votes.spec.js Outdated Show resolved Hide resolved
Copy link
Contributor

@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.

utACK

@fedekunze fedekunze merged commit 409cc0a into develop Dec 11, 2018
@fedekunze fedekunze deleted the sabau/1683-avoid-double-vote branch December 11, 2018 14:00
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.

Governance Proposal voting
2 participants