diff options
Diffstat (limited to 'app/scripts/keyring-controller.js')
-rw-r--r-- | app/scripts/keyring-controller.js | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/app/scripts/keyring-controller.js b/app/scripts/keyring-controller.js index 6b8260a28..111f679c8 100644 --- a/app/scripts/keyring-controller.js +++ b/app/scripts/keyring-controller.js @@ -80,8 +80,6 @@ class KeyringController extends EventEmitter { keyringTypes: this.keyringTypes.map(krt => krt.type), // memStore identities: this.identities, - // diskStore - selectedAccount: state.selectedAccount, // configManager seedWords: this.configManager.getSeedWords(), isDisclaimerConfirmed: this.configManager.getConfirmedDisclaimer(), @@ -141,7 +139,7 @@ class KeyringController extends EventEmitter { const firstAccount = accounts[0] if (!firstAccount) throw new Error('KeyringController - First Account not found.') const hexAccount = normalizeAddress(firstAccount) - this.setSelectedAccount(hexAccount) + this.emit('newAccount', hexAccount) return this.setupAccounts(accounts) }) .then(this.persistAllKeyrings.bind(this, password)) @@ -231,28 +229,6 @@ class KeyringController extends EventEmitter { .then(this.fullUpdate.bind(this)) } - // Set Selected Account - // @string address - // - // returns Promise( @string address ) - // - // Sets the state's `selectedAccount` value - // to the specified address. - setSelectedAccount (account) { - var address = normalizeAddress(account) - this.store.updateState({ selectedAccount: address }) - return this.fullUpdate() - } - - // Get Selected Account - // - // returns String - // - // Gets the state's `selectedAccount` value - getSelectedAccount () { - return this.store.getState().selectedAccount - } - // Save Account Label // @string account // @string label @@ -348,7 +324,6 @@ class KeyringController extends EventEmitter { const firstAccount = accounts[0] if (!firstAccount) throw new Error('KeyringController - No account found on keychain.') const hexAccount = normalizeAddress(firstAccount) - this.setSelectedAccount(hexAccount) this.emit('newAccount', hexAccount) return this.setupAccounts(accounts) }) @@ -595,7 +570,6 @@ class KeyringController extends EventEmitter { this.keyrings = [] this.identities = {} - this.setSelectedAccount() } } |