1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Ensures that new accounts are only created from the modal, and not when clicking 'Create New Account'

This commit is contained in:
Dan 2017-09-15 12:39:34 -02:30 committed by Chi Kei Chan
parent feb90f2fc4
commit b0f1fba2e5
3 changed files with 9 additions and 5 deletions

View File

@ -162,11 +162,11 @@ class AccountDropdowns extends Component {
DropdownMenuItem,
{
closeMenu: () => {},
onClick: () => actions.addNewAccount(),
style: Object.assign(
{},
menuItemStyles,
),
onClick: () => actions.showNewAccountModal(),
},
[
h(
@ -185,9 +185,6 @@ class AccountDropdowns extends Component {
fontSize: '16px',
lineHeight: '23px',
},
onClick: () => {
actions.showNewAccountModal()
},
}, 'Create Account'),
],
),

View File

@ -19,6 +19,10 @@ function mapDispatchToProps (dispatch) {
hideModal: () => {
dispatch(actions.hideModal())
},
createAccount: () => {
dispatch(actions.addNewAccount())
dispatch(actions.hideModal())
},
}
}
@ -60,7 +64,9 @@ NewAccountModal.prototype.render = function () {
]),
h('div.new-account-modal-content.button', {}, [
h('button.btn-clear', {}, [
h('button.btn-clear', {
onClick: this.props.createAccount
}, [
'SAVE',
]),
]),

View File

@ -284,6 +284,7 @@
top: 25px;
right: 17.5px;
font-family: sans-serif;
cursor: pointer;
}
.new-account-modal-content {