From 745fff0c80c49959aad9b0d214aff83cb05c3613 Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 24 Jan 2017 13:29:48 -0800 Subject: hotfix - dont assume hd keyring position --- app/scripts/keyring-controller.js | 8 +++++--- ui/app/actions.js | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index 86c93f5a3..76422bf6b 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -259,9 +259,11 @@ module.exports = class KeyringController extends EventEmitter { // Calls the `addAccounts` method on the Keyring // in the kryings array at index `keyringNum`, // and then saves those changes. - addNewAccount (keyRingNum = 0) { - const ring = this.keyrings[keyRingNum] - return ring.addAccounts(1) + addNewAccount () { + 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.addAccounts(1) .then(this.setupAccounts.bind(this)) .then(this.persistAllKeyrings.bind(this)) .then(this.fullUpdate.bind(this)) diff --git a/ui/app/actions.js b/ui/app/actions.js index 7934a329a..9a68d231a 100644 --- a/ui/app/actions.js +++ b/ui/app/actions.js @@ -270,8 +270,8 @@ function navigateToNewAccountScreen() { } } -function addNewAccount (ringNumber = 0) { - return callBackgroundThenUpdate(background.addNewAccount, ringNumber) +function addNewAccount () { + return callBackgroundThenUpdate(background.addNewAccount) } function showInfoPage () { -- cgit From e2b2e6d5e119ce918d7f383cdd300880e0dce5ce Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 24 Jan 2017 14:04:29 -0800 Subject: 3.1.2 --- CHANGELOG.md | 5 +++++ app/manifest.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e98ce3758..02ff3969f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Current Master + +## 3.1.2 2017-1-24 + +- Fix "New Account" default keychain + ## 3.1.1 2017-1-20 - Fix HD wallet seed export diff --git a/app/manifest.json b/app/manifest.json index c34b17e72..8662c8030 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "MetaMask", "short_name": "Metamask", - "version": "3.1.1", + "version": "3.1.2", "manifest_version": 2, "author": "https://metamask.io", "description": "Ethereum Browser Extension", -- cgit