mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
keyring - add keyringtypes to memStore
This commit is contained in:
parent
d326e7d11e
commit
41c93ceb7e
@ -31,14 +31,15 @@ class KeyringController extends EventEmitter {
|
|||||||
constructor (opts) {
|
constructor (opts) {
|
||||||
super()
|
super()
|
||||||
const initState = opts.initState || {}
|
const initState = opts.initState || {}
|
||||||
|
this.keyringTypes = keyringTypes
|
||||||
this.store = new ObservableStore(initState)
|
this.store = new ObservableStore(initState)
|
||||||
this.memStore = new ObservableStore({
|
this.memStore = new ObservableStore({
|
||||||
keyrings: [],
|
keyrings: [],
|
||||||
|
keyringTypes: this.keyringTypes.map(krt => krt.type),
|
||||||
})
|
})
|
||||||
this.configManager = opts.configManager
|
this.configManager = opts.configManager
|
||||||
this.ethStore = opts.ethStore
|
this.ethStore = opts.ethStore
|
||||||
this.encryptor = encryptor
|
this.encryptor = encryptor
|
||||||
this.keyringTypes = keyringTypes
|
|
||||||
this.keyrings = []
|
this.keyrings = []
|
||||||
this.identities = {} // Essentially a name hash
|
this.identities = {} // Essentially a name hash
|
||||||
|
|
||||||
@ -85,9 +86,8 @@ class KeyringController extends EventEmitter {
|
|||||||
// computed
|
// computed
|
||||||
isInitialized: (!!wallet || !!state.vault),
|
isInitialized: (!!wallet || !!state.vault),
|
||||||
isUnlocked: (!!this.password),
|
isUnlocked: (!!this.password),
|
||||||
// hard coded
|
|
||||||
keyringTypes: this.keyringTypes.map(krt => krt.type),
|
|
||||||
// memStore
|
// memStore
|
||||||
|
keyringTypes: memState.keyringTypes,
|
||||||
identities: this.identities,
|
identities: this.identities,
|
||||||
keyrings: memState.keyrings,
|
keyrings: memState.keyrings,
|
||||||
// messageManager
|
// messageManager
|
||||||
|
Loading…
x
Reference in New Issue
Block a user