Fixed createRandom when no options are passed in.
This commit is contained in:
parent
00b628c6cc
commit
12eb60d2f7
@ -8,7 +8,7 @@ module.exports = {
|
|||||||
HDNode: HDNode,
|
HDNode: HDNode,
|
||||||
Wallet: Wallet,
|
Wallet: Wallet,
|
||||||
|
|
||||||
// Do we need to expose this at all?
|
SigningKey: SigningKey,
|
||||||
_SigningKey: SigningKey,
|
_SigningKey: SigningKey,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ethers-wallet",
|
"name": "ethers-wallet",
|
||||||
"version": "2.0.0",
|
"version": "2.0.1",
|
||||||
"description": "Wallet and signing library for Ethereum.",
|
"description": "Wallet and signing library for Ethereum.",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "http://github.com/ethers-io/ethers.js/issues",
|
"url": "http://github.com/ethers-io/ethers.js/issues",
|
||||||
|
@ -311,6 +311,9 @@ utils.defineProperty(Wallet, 'isEncryptedWallet', function(json) {
|
|||||||
|
|
||||||
utils.defineProperty(Wallet, 'createRandom', function(options) {
|
utils.defineProperty(Wallet, 'createRandom', function(options) {
|
||||||
var entropy = utils.randomBytes(16);
|
var entropy = utils.randomBytes(16);
|
||||||
|
|
||||||
|
if (!options) { options = { }; }
|
||||||
|
|
||||||
if (options.extraEntropy) {
|
if (options.extraEntropy) {
|
||||||
entropy = utils.keccak256(utils.concat([entropy, options.extraEntropy])).substring(0, 34);
|
entropy = utils.keccak256(utils.concat([entropy, options.extraEntropy])).substring(0, 34);
|
||||||
}
|
}
|
||||||
@ -393,7 +396,6 @@ utils.defineProperty(Wallet, 'fromBrainWallet', function(username, password, pro
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//utils.defineProperty(Wallet, 'isCrowdsaleWallet', secretStorage.isCrowdsaleWallet);
|
//utils.defineProperty(Wallet, 'isCrowdsaleWallet', secretStorage.isCrowdsaleWallet);
|
||||||
|
|
||||||
//utils.defineProperty(Wallet, 'decryptCrowdsale', function(json, password) {
|
//utils.defineProperty(Wallet, 'decryptCrowdsale', function(json, password) {
|
||||||
|
Loading…
Reference in New Issue
Block a user