Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #742 from LiskHQ/714-pending-votes-in-dialog
Browse files Browse the repository at this point in the history
Don't show pending votes in voting dialog - Closes #741
  • Loading branch information
slaweet authored Sep 13, 2017
2 parents ad66581 + 92f366e commit e47b779
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/components/voteDialog/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { votePlaced, addedToVoteList, removedFromVoteList } from '../../actions/
import VoteDialog from './voteDialog';

const mapStateToProps = state => ({
votedList: state.voting.votedList,
unvotedList: state.voting.unvotedList,
votedList: state.voting.votedList.filter(item => !item.pending),
unvotedList: state.voting.unvotedList.filter(item => !item.pending),
account: state.account,
activePeer: state.peers.data,
});
Expand Down
8 changes: 4 additions & 4 deletions src/components/voteDialog/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const unvotedList = [
const store = configureMockStore([])({
account: ordinaryAccount,
voting: {
votedList,
unvotedList,
votedList: [...votedList, { pending: true, username: 'pending' }],
unvotedList: [...unvotedList, { pending: true, username: 'pending2' }],
},
peers: { data: {} },
});
Expand All @@ -59,8 +59,8 @@ describe('VoteDialog HOC', () => {
it('should pass appropriate properties to VoteDialog', () => {
const confirmVotesProps = wrapper.find('VoteDialog').props();

expect(confirmVotesProps.votedList).to.be.equal(votedList);
expect(confirmVotesProps.unvotedList).to.be.equal(unvotedList);
expect(confirmVotesProps.votedList).to.be.deep.equal(votedList);
expect(confirmVotesProps.unvotedList).to.be.deep.equal(unvotedList);
expect(confirmVotesProps.account).to.be.equal(ordinaryAccount);
expect(confirmVotesProps.activePeer).to.deep.equal({});
expect(typeof confirmVotesProps.votePlaced).to.be.equal('function');
Expand Down

0 comments on commit e47b779

Please sign in to comment.