This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (sender.asset.user.type !== "board") { | |
errors.push( | |
new TransactionError("Sender is not registered as a board member.") | |
); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!user.type || user.type !== "investor") { | |
errors.push( | |
new TransactionError("Invalid user type for this transaction.") | |
); | |
} |