diff --git a/package-lock.json b/package-lock.json index 6491f71dd..fe2db35b0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11853,9 +11853,9 @@ } }, "ganache-core": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/ganache-core/-/ganache-core-2.1.4.tgz", - "integrity": "sha512-wYpfArYA/pCgoQtsb5V8E62b580MnQfMQHuldWToc6Fa7Z5r5u8eB0oftxbrgbdJkR3oJkNykfc2clq0hgZfWQ==", + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/ganache-core/-/ganache-core-2.1.5.tgz", + "integrity": "sha512-PuHUfISgrQknb7JpspxSzhpoYfqBWoOdTBHQj/81gu6YypRUHzD2Z6gZmFDxDzG30MFElEHp8JtexaGdgq9iYw==", "dev": true, "requires": { "abstract-leveldown": "^3.0.0", @@ -11867,7 +11867,7 @@ "clone": "^2.1.1", "ethereumjs-account": "~2.0.4", "ethereumjs-block": "~1.2.2", - "ethereumjs-tx": "^1.3.0", + "ethereumjs-tx": "1.3.4", "ethereumjs-util": "^5.2.0", "ethereumjs-vm": "2.3.5", "ethereumjs-wallet": "~0.6.0", @@ -12024,6 +12024,24 @@ } } }, + "ethereumjs-tx": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/ethereumjs-tx/-/ethereumjs-tx-1.3.4.tgz", + "integrity": "sha512-kOgUd5jC+0tgV7t52UDECMMz9Uf+Lro+6fSpCvzWemtXfMEcwI3EOxf5mVPMRbTFkMMhuERokNNVF3jItAjidg==", + "dev": true, + "requires": { + "ethereum-common": "^0.0.18", + "ethereumjs-util": "^5.0.0" + }, + "dependencies": { + "ethereum-common": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/ethereum-common/-/ethereum-common-0.0.18.tgz", + "integrity": "sha1-L9w1dvIykDNYl26znaeDIT/5Uj8=", + "dev": true + } + } + }, "ethereumjs-util": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/ethereumjs-util/-/ethereumjs-util-5.2.0.tgz", @@ -12188,9 +12206,9 @@ "dev": true }, "ws": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.1.tgz", - "integrity": "sha512-2NkHdPKjDBj3CHdnAGNpmlliryKqF+n9MYXX7/wsVC4yqYocKreKNjydPDvT3wShAZnndlM0RytEfTALCDvz7A==", + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz", + "integrity": "sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA==", "dev": true, "requires": { "async-limiter": "~1.0.0" @@ -18644,9 +18662,9 @@ } }, "log4js": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.10.0.tgz", - "integrity": "sha512-NnhN9PjFF9zhxinAjlmDYvkqqrIW+yA3LLJAoTJ3fs6d1zru86OqQHfsxiUcc1kRq3z+faGR4DeyXUfiNbVxKQ==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-2.11.0.tgz", + "integrity": "sha512-z1XdwyGFg8/WGkOyF6DPJjivCWNLKrklGdViywdYnSKOvgtEBo2UyEMZS5sD2mZrQlU3TvO8wDWLc8mzE1ncBQ==", "dev": true, "requires": { "amqplib": "^0.5.2", @@ -18665,9 +18683,9 @@ }, "dependencies": { "circular-json": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.4.tgz", - "integrity": "sha512-vnJA8KS0BfOihugYEUkLRcnmq21FbuivbxgzDLXNs3zIk4KllV4Mx4UuTzBXht9F00C7QfD1YqMXg1zP6EXpig==", + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.5.5.tgz", + "integrity": "sha512-13YaR6kiz0kBNmIVM87Io8Hp7bWOo4r61vkEANy8iH9R9bc6avud/1FT0SBpqR1RpIQADOh/Q+yHZDA1iL6ysA==", "dev": true }, "debug": { diff --git a/package.json b/package.json index 84db617bd..d1d587474 100644 --- a/package.json +++ b/package.json @@ -238,7 +238,7 @@ "file-loader": "^1.1.11", "fs-promise": "^2.0.3", "ganache-cli": "^6.1.0", - "ganache-core": "^2.1.4", + "ganache-core": "^2.1.5", "geckodriver": "^1.11.0", "gh-pages": "^1.2.0", "gifencoder": "^1.1.0", diff --git a/ui/app/components/account-menu/index.js b/ui/app/components/account-menu/index.js index c5b577cfd..fc48b60f3 100644 --- a/ui/app/components/account-menu/index.js +++ b/ui/app/components/account-menu/index.js @@ -69,8 +69,8 @@ function mapDispatchToProps (dispatch) { dispatch(actions.hideSidebar()) dispatch(actions.toggleAccountMenu()) }, - showRemoveAccountConfirmationModal: (address) => { - return dispatch(actions.showModal({ name: 'CONFIRM_REMOVE_ACCOUNT', address })) + showRemoveAccountConfirmationModal: (identity) => { + return dispatch(actions.showModal({ name: 'CONFIRM_REMOVE_ACCOUNT', identity })) }, } } @@ -193,13 +193,13 @@ AccountMenu.prototype.renderAccounts = function () { ]), this.renderKeyringType(keyring), - this.renderRemoveAccount(keyring, identity.address), + this.renderRemoveAccount(keyring, identity), ], ) }) } -AccountMenu.prototype.renderRemoveAccount = function (keyring, address) { +AccountMenu.prototype.renderRemoveAccount = function (keyring, identity) { // Any account that's not from the HD wallet Keyring can be removed const type = keyring.type const isRemovable = type !== 'HD Key Tree' @@ -209,18 +209,18 @@ AccountMenu.prototype.renderRemoveAccount = function (keyring, address) { position: 'bottom', }, [ h('a.remove-account-icon', { - onClick: (e) => this.removeAccount(e, address), + onClick: (e) => this.removeAccount(e, identity), }, ''), ]) } return null } -AccountMenu.prototype.removeAccount = function (e, address) { +AccountMenu.prototype.removeAccount = function (e, identity) { e.preventDefault() e.stopPropagation() const { showRemoveAccountConfirmationModal } = this.props - showRemoveAccountConfirmationModal(address) + showRemoveAccountConfirmationModal(identity) } AccountMenu.prototype.renderKeyringType = function (keyring) { diff --git a/ui/app/components/modals/confirm-remove-account/confirm-remove-account.component.js b/ui/app/components/modals/confirm-remove-account/confirm-remove-account.component.js index d6c0c796d..b9dc6364f 100644 --- a/ui/app/components/modals/confirm-remove-account/confirm-remove-account.component.js +++ b/ui/app/components/modals/confirm-remove-account/confirm-remove-account.component.js @@ -2,12 +2,15 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import Button from '../../button' import { addressSummary } from '../../../util' +import Identicon from '../../identicon' +import genAccountLink from '../../../../lib/account-link' class ConfirmRemoveAccount extends Component { static propTypes = { hideModal: PropTypes.func.isRequired, removeAccount: PropTypes.func.isRequired, - address: PropTypes.string.isRequired, + identity: PropTypes.object.isRequired, + network: PropTypes.string.isRequired, } static contextTypes = { @@ -15,10 +18,43 @@ class ConfirmRemoveAccount extends Component { } handleRemove () { - this.props.removeAccount(this.props.address) + this.props.removeAccount(this.props.identity.address) .then(() => this.props.hideModal()) } + renderSelectedAccount () { + const { identity } = this.props + return ( +
+
+ +
+
+ Name + {identity.name} +
+
+ Public Address + { addressSummary(identity.address) } +
+
+ + + +
+
+ ) + } + render () { const { t } = this.context @@ -28,9 +64,7 @@ class ConfirmRemoveAccount extends Component {
{ `${t('removeAccount')}` }?
-
- {addressSummary(this.props.address)} -
+ { this.renderSelectedAccount() }
{ t('removeAccountDescription') } { t('learnMore') } diff --git a/ui/app/components/modals/confirm-remove-account/confirm-remove-account.container.js b/ui/app/components/modals/confirm-remove-account/confirm-remove-account.container.js index fcb149b3f..4b194c995 100644 --- a/ui/app/components/modals/confirm-remove-account/confirm-remove-account.container.js +++ b/ui/app/components/modals/confirm-remove-account/confirm-remove-account.container.js @@ -5,7 +5,8 @@ const { hideModal, removeAccount } = require('../../../actions') const mapStateToProps = state => { return { - address: state.appState.modal.modalState.props.address, + identity: state.appState.modal.modalState.props.identity, + network: state.metamask.network, } }