aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrankie <frankie.diamond@gmail.com>2017-01-21 05:56:50 +0800
committerGitHub <noreply@github.com>2017-01-21 05:56:50 +0800
commit03b3e2f880809f1933661116926bbd966639f135 (patch)
treeabbe60429fa21041949eb5c70aa13b1443c5ffc3
parent25e57939920d4685a20b4e7b3a14060e9d3314c7 (diff)
parent9c6cf905387e605724bf568169d0311380f1da22 (diff)
downloadtangerine-wallet-browser-03b3e2f880809f1933661116926bbd966639f135.tar.gz
tangerine-wallet-browser-03b3e2f880809f1933661116926bbd966639f135.tar.zst
tangerine-wallet-browser-03b3e2f880809f1933661116926bbd966639f135.zip
Merge pull request #1037 from MetaMask/i1034-seed-export
keyring controller - placeSeedWords should use first hdKeyring
-rw-r--r--app/scripts/keyring-controller.js4
1 files changed, 3 insertions, 1 deletions
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