Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
protected async signTransactions(flags: Record, wallets: Record): Promise {
const transactions = [];
for (const [address, wallet] of Object.entries(wallets)) {
wallets[address].username = pokemon
.random()
.toLowerCase()
.replace(/ /g, "_");
transactions.push(
this.signer.makeDelegate({
...flags,
...{
username: wallets[address].username,
// @ts-ignore
passphrase: wallet.passphrase,
},
}),
);
}
export const addConnection = () => (dispatch) => {
const { publicKey } = nacl.sign.keyPair();
const timestamp = Date.now();
const trustScore = Math.random() * 49.5 + 50.5;
const nameornym = pokemon.random();
// set public key
dispatch(setConnectPublicKey(publicKey));
// set nameornym
dispatch(setConnectNameornym(nameornym));
// set avatar
// dispatch(setConnectAvatar(avatar));
// set trust score
dispatch(setConnectTrustScore(trustScore.toFixed(1)));