diff options
-rw-r--r-- | app/scripts/keyring-controller.js | 4 | ||||
-rw-r--r-- | app/scripts/keyrings/simple.js | 9 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 1 |
3 files changed, 7 insertions, 7 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index 857f2e684..92429f7f5 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -95,7 +95,6 @@ module.exports = class KeyringController extends EventEmitter { isInitialized: (!!wallet || !!vault), isUnlocked: Boolean(this.password), isDisclaimerConfirmed: this.configManager.getConfirmedDisclaimer(), - unconfTxs: this.configManager.unconfirmedTxs(), transactions: this.configManager.getTxList(), unconfMsgs: messageManager.unconfirmedMsgs(), messages: messageManager.getMsgList(), @@ -111,7 +110,6 @@ module.exports = class KeyringController extends EventEmitter { }) } - // Create New Vault And Keychain // @string password - The password to encrypt the vault with // @@ -510,7 +508,7 @@ module.exports = class KeyringController extends EventEmitter { if (typeof password === 'string') { this.password = password } - return Promise.all(this.keyrings.map((keyring, i) => { + return Promise.all(this.keyrings.map((keyring) => { return Promise.all([keyring.type, keyring.serialize()]) .then((serializedKeyringArray) => { // Label the output values on each serialized Keyring: diff --git a/app/scripts/keyrings/simple.js b/app/scripts/keyrings/simple.js index 8f339cf80..9717f1c45 100644 --- a/app/scripts/keyrings/simple.js +++ b/app/scripts/keyrings/simple.js @@ -19,10 +19,11 @@ class SimpleKeyring extends EventEmitter { return Promise.resolve(this.wallets.map(w => w.getPrivateKey().toString('hex'))) } - deserialize (wallets = []) { - this.wallets = wallets.map((w) => { - var b = new Buffer(w, 'hex') - const wallet = Wallet.fromPrivateKey(b) + deserialize (privateKeys = []) { + this.wallets = privateKeys.map((privateKey) => { + const stripped = ethUtil.stripHexPrefix(privateKey) + const buffer = new Buffer(stripped, 'hex') + const wallet = Wallet.fromPrivateKey(buffer) return wallet }) return Promise.resolve() diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 46e093000..3e27272b9 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -69,6 +69,7 @@ module.exports = class MetamaskController { this.state, this.ethStore.getState(), this.configManager.getConfig(), + this.txManager.getState(), keyringControllerState, this.noticeController.getState(), { lostAccounts: this.configManager.getLostAccounts(), |