diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-10-21 07:44:31 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-10-21 07:45:58 +0800 |
commit | 55d56f77cf42a9c4e80768fd7e4a9bb6f0485606 (patch) | |
tree | 188e95248f865459b5a816ea51f889145f43d92b /ui/app | |
parent | 351c8e2086e043ee66e42f653dcb2b446dd88808 (diff) | |
download | tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar.gz tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar.bz2 tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar.lz tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar.xz tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.tar.zst tangerine-wallet-browser-55d56f77cf42a9c4e80768fd7e4a9bb6f0485606.zip |
Began adding first basic keyring
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/accounts/index.js | 6 | ||||
-rw-r--r-- | ui/app/actions.js | 16 | ||||
-rw-r--r-- | ui/app/app.js | 1 |
3 files changed, 19 insertions, 4 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..e49cac4b4 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.message)) + } + 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..3ceae0027 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'}) |