Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
secondSignatureAccountState.find(
account => account.address === accounts.existingDelegate.address,
).secondPublicKey =
'62e4d09ce3fa571fb4b073fb229f5ff18b6108ca89357924db887a409f61542c';
const targetAccount = secondSignatureAccountState.find(
account => account.address === accounts.existingDelegate.address,
);
targetAccount.balance = parseInt(
new BigNum(targetAccount.balance.toString()).sub(500000000).toString(),
10,
);
const newSecondPassphraseTx = new SecondSignatureTransaction(
secondPassphraseObject,
);
newSecondPassphraseTx.sign(accounts.existingDelegate.passphrase);
const blockWithNewSecondSignatureNewRegistration = createBlock(
defaultConfig,
resultingAccountState,
block,
3,
0,
{
version: 1,
transactions: [newSecondPassphraseTx],
},
);
transferTx.sign(accounts.genesis.passphrase);
const secondSignature =
'erupt sponsor rude supreme vacant delay salute allow laundry swamp curve brain';
const { publicKey } = getKeys(secondSignature);
const secondPassphraseObject = {
timestamp,
senderPublicKey: accounts.existingDelegate.publicKey,
asset: {
signature: {
publicKey,
},
},
};
const secondPassphraseTx = new SecondSignatureTransaction(
secondPassphraseObject,
);
secondPassphraseTx.sign(accounts.existingDelegate.passphrase);
const block = createBlock(
defaultConfig,
initialAccountState,
genesisBlock,
1,
0,
{
version: 1,
transactions: [transferTx, secondPassphraseTx],
},
);