aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2016-10-24 07:21:11 +0800
committerKevin Serrano <kevgagser@gmail.com>2016-10-24 07:21:11 +0800
commit16e2f029d8b76e6f1e951d35307d955c2346cd8d (patch)
tree645d3b227f6323e0339f68eb1d36529a6efc4761 /ui
parentb99b5484fec53629a25e9a3e2b4d43f1b1bc7e34 (diff)
parent152419a79bd26d9b6f5af43c2066eb1e6f619716 (diff)
downloadtangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar
tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar.gz
tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar.bz2
tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar.lz
tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar.xz
tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.tar.zst
tangerine-wallet-browser-16e2f029d8b76e6f1e951d35307d955c2346cd8d.zip
Merge branch 'i328-MultiVault' of github.com:MetaMask/metamask-plugin into i328-MultiVault
Diffstat (limited to 'ui')
-rw-r--r--ui/app/accounts/index.js6
-rw-r--r--ui/app/actions.js16
-rw-r--r--ui/app/app.js8
3 files changed, 20 insertions, 10 deletions
diff --git a/ui/app/accounts/index.js b/ui/app/accounts/index.js
index 7551c498e..92054f24d 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.onRevealAccount()
+ this.addNewKeyring()
},
style: {
display: 'flex',
@@ -146,8 +146,8 @@ AccountsScreen.prototype.onShowDetail = function (address, event) {
this.props.dispatch(actions.showAccountDetail(address))
}
-AccountsScreen.prototype.onRevealAccount = function () {
- this.props.dispatch(actions.revealAccount())
+AccountsScreen.prototype.addNewKeyring = function () {
+ this.props.dispatch(actions.addNewKeyring('Simple Key Pair'))
}
AccountsScreen.prototype.goHome = function () {
diff --git a/ui/app/actions.js b/ui/app/actions.js
index 230ffee78..525ceca54 100644
--- a/ui/app/actions.js
+++ b/ui/app/actions.js
@@ -25,6 +25,7 @@ var actions = {
showInitializeMenu: showInitializeMenu,
createNewVault: createNewVault,
createNewVaultInProgress: createNewVaultInProgress,
+ addNewKeyring: addNewKeyring,
showNewVaultSeed: showNewVaultSeed,
showInfoPage: showInfoPage,
// unlock screen
@@ -136,6 +137,7 @@ var actions = {
SHOW_NEW_KEYCHAIN: 'SHOW_NEW_KEYCHAIN',
showNewKeychain: showNewKeychain,
+
}
module.exports = actions
@@ -187,6 +189,20 @@ function createNewVault (password, entropy) {
}
}
+function addNewKeyring (type, opts) {
+ return (dispatch) => {
+ dispatch(actions.showLoadingIndication())
+ background.addNewKeyring(type, opts, (err, newState) => {
+ dispatch(this.hideLoadingIndication())
+ if (err) {
+ return dispatch(actions.showWarning(err))
+ }
+ dispatch(this.updateMetamaskState(newState))
+ dispatch(this.showAccountsPage())
+ })
+ }
+}
+
function showInfoPage () {
return {
type: actions.SHOW_INFO_PAGE,
diff --git a/ui/app/app.js b/ui/app/app.js
index fb9b16a3a..a1004b74b 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -405,7 +405,6 @@ App.prototype.renderPrimary = function () {
// show current view
switch (props.currentView.name) {
-
case 'createVault':
return h(CreateVaultScreen, {key: 'createVault'})
@@ -502,12 +501,7 @@ App.prototype.renderCustomOption = function (rpcTarget) {
return null
case 'http://localhost:8545':
- return h(DropMenuItem, {
- label: 'Custom RPC',
- closeMenu: () => this.setState({ isNetworkMenuOpen: false }),
- action: () => this.props.dispatch(actions.showConfigPage()),
- icon: h('i.fa.fa-question-circle.fa-lg'),
- })
+ return null
default:
return h(DropMenuItem, {