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

Commit

Permalink
Fix autocomplete when changing a vote - Closes #990
Browse files Browse the repository at this point in the history
  • Loading branch information
slaweet committed May 18, 2018
1 parent 49d1cfa commit ee99a99
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 ee99a99

Please sign in to comment.