1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge remote-tracking branch 'origin/ShowDifferentAccounts' into RevertTxManager

This commit is contained in:
Dan Finlay 2017-01-02 17:38:37 -08:00
commit b93cdd428b
3 changed files with 7 additions and 7 deletions

View File

@ -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:

View File

@ -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()

View File

@ -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(),