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

Fix delegate autocomplete to filter out selected delegates - Closes #872 #874

Merged
merged 1 commit into from
Oct 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/api/delegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const voteAutocomplete = (activePeer, username, votedDict) => {

export const unvoteAutocomplete = (username, votedDict) =>
new Promise(resolve => resolve(Object.keys(votedDict)
.filter(delegate => delegate.indexOf(username) !== -1)
.filter(delegate => delegate.indexOf(username) !== -1 && votedDict[delegate].unconfirmed)
.map(element => ({ username: element, publicKey: votedDict[element].publicKey }))),
);

Expand Down