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:
parent
feb90f2fc4
commit
b0f1fba2e5
@ -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'),
|
||||
],
|
||||
),
|
||||
|
@ -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',
|
||||
]),
|
||||
]),
|
||||
|
@ -284,6 +284,7 @@
|
||||
top: 25px;
|
||||
right: 17.5px;
|
||||
font-family: sans-serif;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.new-account-modal-content {
|
||||
|
Loading…
Reference in New Issue
Block a user