Cleaning up wallet.
This commit is contained in:
parent
005c0d2cdc
commit
b5f4d3b113
@ -335,7 +335,7 @@ utils.defineProperty(Wallet, 'summonBrainWallet', function(username, password, p
|
|||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
} else if (key) {
|
} else if (key) {
|
||||||
resolve(new Wallet(new Buffer(key)));
|
resolve(new Wallet(utils.hexlify(key)));
|
||||||
} else if (progressCallback) {
|
} else if (progressCallback) {
|
||||||
progressCallback(progress);
|
progressCallback(progress);
|
||||||
}
|
}
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
"ethers-utils": "2.0.0",
|
"ethers-utils": "2.0.0",
|
||||||
"aes-js": "3.0.0",
|
"aes-js": "3.0.0",
|
||||||
"elliptic": "6.3.3",
|
"elliptic": "6.3.3",
|
||||||
"pbkdf2": "3.0.4",
|
|
||||||
"rlp": "2.0.0",
|
|
||||||
"scrypt-js": "2.0.3",
|
"scrypt-js": "2.0.3",
|
||||||
"setimmediate": "1.0.4",
|
"setimmediate": "1.0.4",
|
||||||
"uuid": "2.0.1"
|
"uuid": "2.0.1"
|
||||||
|
@ -90,7 +90,7 @@ utils.defineProperty(secretStorage, 'decryptCrowdsale', function(json, password)
|
|||||||
throw new Error('invalid encseed');
|
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 iv = encseed.slice(0, 16);
|
||||||
var encryptedSeed = encseed.slice(16);
|
var encryptedSeed = encseed.slice(16);
|
||||||
|
@ -6,9 +6,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var elliptic = require('elliptic');
|
var secp256k1 = new (require('elliptic')).ec('secp256k1');
|
||||||
var secp256k1 = new (elliptic.ec)('secp256k1');
|
|
||||||
|
|
||||||
var utils = require('ethers-utils');
|
var utils = require('ethers-utils');
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user