Skip to content

Instantly share code, notes, and snippets.

@PaulLaux
Created August 28, 2018 10:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulLaux/e1353163ee24931eecb98cd65bd6c4be to your computer and use it in GitHub Desktop.
Save PaulLaux/e1353163ee24931eecb98cd65bd6c4be to your computer and use it in GitHub Desktop.
Generating new wallet params
/**
* Generate new seed and password
* https://github.com/PaulLaux/eth-hot-wallet/blob/master/app/containers/HomePage/saga.js#L69
*/
export function* generateWallet() {
try {
const password = generateString(generatedPasswordLength);
const extraEntropy = generateString(generatedPasswordLength);
const seed = lightwallet.keystore.generateRandomSeed(extraEntropy);
yield put(generateWalletSucces(seed, password));
} catch (err) {
yield put(generateWalletError(err));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment