aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-10-29 03:10:35 +0800
committerDan Finlay <dan@danfinlay.com>2016-10-29 03:10:35 +0800
commit6ec471c6dcc52a9d2b599b849fa5017f3056fd43 (patch)
treefba209ff6234299ba31c08a2d7cead3b29f1eae1 /ui
parent2690d1acfd3042f468cb2cd7ccc2dccd63c20cc9 (diff)
downloadtangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar.gz
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar.bz2
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar.lz
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar.xz
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.tar.zst
tangerine-wallet-browser-6ec471c6dcc52a9d2b599b849fa5017f3056fd43.zip
Configure BIP44 Keychain as default one
Diffstat (limited to 'ui')
-rw-r--r--ui/app/accounts/index.js6
-rw-r--r--ui/app/actions.js17
2 files changed, 19 insertions, 4 deletions
diff --git a/ui/app/accounts/index.js b/ui/app/accounts/index.js
index 92054f24d..c742d9fac 100644
--- a/ui/app/accounts/index.js
+++ b/ui/app/accounts/index.js
@@ -87,7 +87,7 @@ AccountsScreen.prototype.render = function () {
h('div.footer.hover-white.pointer', {
key: 'reveal-account-bar',
onClick: () => {
- this.addNewKeyring()
+ this.addNewAccount()
},
style: {
display: 'flex',
@@ -146,8 +146,8 @@ AccountsScreen.prototype.onShowDetail = function (address, event) {
this.props.dispatch(actions.showAccountDetail(address))
}
-AccountsScreen.prototype.addNewKeyring = function () {
- this.props.dispatch(actions.addNewKeyring('Simple Key Pair'))
+AccountsScreen.prototype.addNewAccount = function () {
+ this.props.dispatch(actions.addNewAccount(0))
}
AccountsScreen.prototype.goHome = function () {
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 1f8ba7f04..3ae3a623d 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -25,7 +25,8 @@ var actions = {
showInitializeMenu: showInitializeMenu,
createNewVault: createNewVault,
createNewVaultInProgress: createNewVaultInProgress,
- addNewKeyring: addNewKeyring,
+ addNewKeyring,
+ addNewAccount,
showNewVaultSeed: showNewVaultSeed,
showInfoPage: showInfoPage,
// unlock screen
@@ -178,6 +179,7 @@ function createNewVault (password, entropy) {
if (err) {
return dispatch(actions.showWarning(err.message))
}
+
dispatch(this.updateMetamaskState(newState))
dispatch(this.showAccountsPage())
dispatch(this.hideLoadingIndication())
@@ -199,6 +201,19 @@ function addNewKeyring (type, opts) {
}
}
+function addNewAccount (ringNumber = 0) {
+ return (dispatch) => {
+ dispatch(actions.showLoadingIndication())
+ background.addNewAccount(ringNumber, (err, newState) => {
+ dispatch(this.hideLoadingIndication())
+ if (err) {
+ return dispatch(actions.showWarning(err))
+ }
+ dispatch(this.updateMetamaskState(newState))
+ })
+ }
+}
+
function showInfoPage () {
return {
type: actions.SHOW_INFO_PAGE,