Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
);
}
// Get the account that's voting
const votingAccount = this.findAccountByAddress(
votingAccountAddress,
Object.values(this.state.accounts),
);
// Create the JSON for the vote transaction
const castVotesObject = castVotes({
votes: votedDelegates,
unvotes: unvotedDelegates,
});
castVotesObject.timestamp = this.timestamp;
// Create vote transaction instance
const voteInstance = new VoteTransaction(castVotesObject);
voteInstance.sign(votingAccount.passphrase);
this.state.pendingTransactions.push(voteInstance);
return this;
},
}),