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,
|
DropdownMenuItem,
|
||||||
{
|
{
|
||||||
closeMenu: () => {},
|
closeMenu: () => {},
|
||||||
onClick: () => actions.addNewAccount(),
|
|
||||||
style: Object.assign(
|
style: Object.assign(
|
||||||
{},
|
{},
|
||||||
menuItemStyles,
|
menuItemStyles,
|
||||||
),
|
),
|
||||||
|
onClick: () => actions.showNewAccountModal(),
|
||||||
},
|
},
|
||||||
[
|
[
|
||||||
h(
|
h(
|
||||||
@ -185,9 +185,6 @@ class AccountDropdowns extends Component {
|
|||||||
fontSize: '16px',
|
fontSize: '16px',
|
||||||
lineHeight: '23px',
|
lineHeight: '23px',
|
||||||
},
|
},
|
||||||
onClick: () => {
|
|
||||||
actions.showNewAccountModal()
|
|
||||||
},
|
|
||||||
}, 'Create Account'),
|
}, 'Create Account'),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -19,6 +19,10 @@ function mapDispatchToProps (dispatch) {
|
|||||||
hideModal: () => {
|
hideModal: () => {
|
||||||
dispatch(actions.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('div.new-account-modal-content.button', {}, [
|
||||||
h('button.btn-clear', {}, [
|
h('button.btn-clear', {
|
||||||
|
onClick: this.props.createAccount
|
||||||
|
}, [
|
||||||
'SAVE',
|
'SAVE',
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
|
@ -284,6 +284,7 @@
|
|||||||
top: 25px;
|
top: 25px;
|
||||||
right: 17.5px;
|
right: 17.5px;
|
||||||
font-family: sans-serif;
|
font-family: sans-serif;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-account-modal-content {
|
.new-account-modal-content {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user