Skip to content

Commit 12eb60d

Browse files
committed
Fixed createRandom when no options are passed in.
1 parent 00b628c commit 12eb60d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

wallet/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module.exports = {
88
HDNode: HDNode,
99
Wallet: Wallet,
1010

11-
// Do we need to expose this at all?
11+
SigningKey: SigningKey,
1212
_SigningKey: SigningKey,
1313
}
1414

wallet/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ethers-wallet",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Wallet and signing library for Ethereum.",
55
"bugs": {
66
"url": "http://github.com/ethers-io/ethers.js/issues",

wallet/wallet.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ utils.defineProperty(Wallet, 'isEncryptedWallet', function(json) {
311311

312312
utils.defineProperty(Wallet, 'createRandom', function(options) {
313313
var entropy = utils.randomBytes(16);
314+
315+
if (!options) { options = { }; }
316+
314317
if (options.extraEntropy) {
315318
entropy = utils.keccak256(utils.concat([entropy, options.extraEntropy])).substring(0, 34);
316319
}
@@ -393,7 +396,6 @@ utils.defineProperty(Wallet, 'fromBrainWallet', function(username, password, pro
393396
});
394397
});
395398

396-
397399
//utils.defineProperty(Wallet, 'isCrowdsaleWallet', secretStorage.isCrowdsaleWallet);
398400

399401
//utils.defineProperty(Wallet, 'decryptCrowdsale', function(json, password) {

0 commit comments

Comments
 (0)