1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00

keyring controller - placeSeedWords should use first hdKeyring

This commit is contained in:
kumavis 2017-01-20 13:52:21 -08:00
parent 25e5793992
commit 9c6cf90538

View File

@ -172,7 +172,9 @@ module.exports = class KeyringController extends EventEmitter {
// Used when creating a first vault, to allow confirmation.
// Also used when revealing the seed words in the confirmation view.
placeSeedWords () {
const firstKeyring = this.keyrings[0]
const hdKeyrings = this.keyrings.filter((keyring) => keyring.type === 'HD Key Tree')
const firstKeyring = hdKeyrings[0]
if (!firstKeyring) throw new Error('KeyringController - No HD Key Tree found')
return firstKeyring.serialize()
.then((serialized) => {
const seedWords = serialized.mnemonic