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 #1074 from LiskHQ/990-fix-vote-autocomplete
Browse files Browse the repository at this point in the history
Fix autocomplete when changing a vote - Closes #990
  • Loading branch information
yasharAyari authored May 23, 2018
2 parents 12ccd0d + ee99a99 commit 97464ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/api/delegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ export const voteAutocomplete = (activePeer, username, votedDict) => {
return new Promise((resolve, reject) =>
listDelegates(activePeer, options)
.then((response) => {
resolve(response.data.filter(delegate =>
Object.keys(votedDict).filter(item => item === delegate.username).length === 0,
resolve(response.delegates.filter(delegate =>
Object.keys(votedDict).filter(item =>
(item === delegate.username) && (item.confirmed || item.unconfirmed)).length === 0,
));
})
.catch(reject),
Expand Down

0 comments on commit 97464ac

Please sign in to comment.