Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Decentralized Organization Chain - Add Poll tx snippet
if (recipient.asset.poll.votes) {
let votes = recipient.asset.poll.votes;
if (votes[vote]) {
++votes[vote];
recipient.asset.poll.votes = votes;
} else {
recipient.asset.poll.votes = { ...votes, [vote]: 1 };
}
} else {
recipient.asset.poll.votes = { [vote]: 1 };
}
store.account.set(recipient.address, recipient);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.