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:
commit
b93cdd428b
@ -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:
|
||||
|
@ -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()
|
||||
|
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user