Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
for: delegateAddress => {
const sender = Object.values(this.state.accounts).find(
anAccount => anAccount.address === delegateAddress,
);
const registerDelegateTx = new DelegateTransaction({
timestamp: this.timestamp,
asset: {
delegate: {
username: delegateName,
},
},
});
registerDelegateTx.sign(sender.passphrase);
// Push it to pending transaction
this.state.pendingTransactions.push(registerDelegateTx);
this.lastTransactionId = registerDelegateTx._id;
return this;
},
};