From 9c6cf905387e605724bf568169d0311380f1da22 Mon Sep 17 00:00:00 2001 From: kumavis Date: Fri, 20 Jan 2017 13:52:21 -0800 Subject: [PATCH] keyring controller - placeSeedWords should use first hdKeyring --- app/scripts/keyring-controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index e609403cc..86c93f5a3 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -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