aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/keyring-controller.js
diff options
context:
space:
mode:
authorFrankie <frankie.diamond@gmail.com>2017-02-02 04:03:42 +0800
committerFrankie <frankie.diamond@gmail.com>2017-02-02 04:03:42 +0800
commitce0c3ed03c20eb0b7438cb9add7cbce490d7de64 (patch)
tree7ac9686e82b938097c698b3b68ddc1e1b55598c8 /app/scripts/keyring-controller.js
parente2e8a7cca06f7e6f41f417d86710227b0b5428d6 (diff)
parent82578538198de74955d7bc5cfd3c9a02d1b69a6d (diff)
downloadtangerine-wallet-browser-ce0c3ed03c20eb0b7438cb9add7cbce490d7de64.tar
tangerine-wallet-browser-ce0c3ed03c20eb0b7438cb9add7cbce490d7de64.tar.gz
tangerine-wallet-browser-ce0c3ed03c20eb0b7438cb9add7cbce490d7de64.tar.bz2
tangerine-wallet-browser-ce0c3ed03c20eb0b7438cb9add7cbce490d7de64.tar.lz
tangerine-wallet-browser-ce0c3ed03c20eb0b7438cb9add7cbce490d7de64.tar.xz
tangerine-wallet-browser-ce0c3ed03c20eb0b7438cb9add7cbce490d7de64.tar.zst
tangerine-wallet-browser-ce0c3ed03c20eb0b7438cb9add7cbce490d7de64.zip
Merge branch 'dev' into messageManagerCleanUp
Diffstat (limited to 'app/scripts/keyring-controller.js')
-rw-r--r--app/scripts/keyring-controller.js28
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()
}
}