keyring - rm config dep

feature/default_network_editable
kumavis 8 years ago
parent 296b278592
commit 5c5aa6ea01
  1. 3
      app/scripts/keyring-controller.js
  2. 4
      app/scripts/metamask-controller.js

@ -33,7 +33,6 @@ class KeyringController extends EventEmitter {
keyrings: [], keyrings: [],
identities: {}, identities: {},
}) })
this.configManager = opts.configManager
this.ethStore = opts.ethStore this.ethStore = opts.ethStore
this.encryptor = encryptor this.encryptor = encryptor
this.keyrings = [] this.keyrings = []
@ -80,8 +79,6 @@ class KeyringController extends EventEmitter {
keyringTypes: memState.keyringTypes, keyringTypes: memState.keyringTypes,
identities: memState.identities, identities: memState.identities,
keyrings: memState.keyrings, keyrings: memState.keyrings,
// configManager
seedWords: this.configManager.getSeedWords(),
} }
return result return result
} }

@ -59,7 +59,6 @@ module.exports = class MetamaskController extends EventEmitter {
this.keyringController = new KeyringController({ this.keyringController = new KeyringController({
initState: initState.KeyringController, initState: initState.KeyringController,
ethStore: this.ethStore, ethStore: this.ethStore,
configManager: this.configManager,
getNetwork: this.getStateNetwork.bind(this), getNetwork: this.getStateNetwork.bind(this),
}) })
this.keyringController.on('newAccount', (address) => { this.keyringController.on('newAccount', (address) => {
@ -190,6 +189,7 @@ module.exports = class MetamaskController extends EventEmitter {
conversionRate: this.configManager.getConversionRate(), conversionRate: this.configManager.getConversionRate(),
conversionDate: this.configManager.getConversionDate(), conversionDate: this.configManager.getConversionDate(),
isDisclaimerConfirmed: this.configManager.getConfirmedDisclaimer(), isDisclaimerConfirmed: this.configManager.getConfirmedDisclaimer(),
seedWords: this.configManager.getSeedWords(),
} }
) )
} }
@ -339,7 +339,7 @@ module.exports = class MetamaskController extends EventEmitter {
.then((serialized) => { .then((serialized) => {
const seedWords = serialized.mnemonic const seedWords = serialized.mnemonic
this.configManager.setSeedWords(seedWords) this.configManager.setSeedWords(seedWords)
promiseToCallback(this.keyringController.fullUpdate())(cb) cb()
}) })
} }

Loading…
Cancel
Save