mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-23 02:10:12 +01:00
Merge pull request #1037 from MetaMask/i1034-seed-export
keyring controller - placeSeedWords should use first hdKeyring
This commit is contained in:
commit
03b3e2f880
@ -172,7 +172,9 @@ module.exports = class KeyringController extends EventEmitter {
|
|||||||
// Used when creating a first vault, to allow confirmation.
|
// Used when creating a first vault, to allow confirmation.
|
||||||
// Also used when revealing the seed words in the confirmation view.
|
// Also used when revealing the seed words in the confirmation view.
|
||||||
placeSeedWords () {
|
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()
|
return firstKeyring.serialize()
|
||||||
.then((serialized) => {
|
.then((serialized) => {
|
||||||
const seedWords = serialized.mnemonic
|
const seedWords = serialized.mnemonic
|
||||||
|
Loading…
Reference in New Issue
Block a user