Cleaning up wallet.

This commit is contained in:
ricmoo 2017-02-27 00:02:40 -05:00
parent 005c0d2cdc
commit b5f4d3b113
4 changed files with 3 additions and 7 deletions

@ -335,7 +335,7 @@ utils.defineProperty(Wallet, 'summonBrainWallet', function(username, password, p
if (error) {
reject(error);
} else if (key) {
resolve(new Wallet(new Buffer(key)));
resolve(new Wallet(utils.hexlify(key)));
} else if (progressCallback) {
progressCallback(progress);
}

@ -10,8 +10,6 @@
"ethers-utils": "2.0.0",
"aes-js": "3.0.0",
"elliptic": "6.3.3",
"pbkdf2": "3.0.4",
"rlp": "2.0.0",
"scrypt-js": "2.0.3",
"setimmediate": "1.0.4",
"uuid": "2.0.1"

@ -90,7 +90,7 @@ utils.defineProperty(secretStorage, 'decryptCrowdsale', function(json, password)
throw new Error('invalid encseed');
}
var key = pbkdf2.pbkdf2Sync(password, password, 2000, 32, 'sha256').slice(0, 16);
var key = utils.pbkdf2(password, password, 2000, 32, utils.hmac.createSha256Hmac).slice(0, 16);
var iv = encseed.slice(0, 16);
var encryptedSeed = encseed.slice(16);

@ -6,9 +6,7 @@
*
*/
var elliptic = require('elliptic');
var secp256k1 = new (elliptic.ec)('secp256k1');
var secp256k1 = new (require('elliptic')).ec('secp256k1');
var utils = require('ethers-utils');