From ea8fa580be814654790407d1c07ca50bf434d3f5 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Fri, 17 Jul 2020 20:30:25 -0300 Subject: [PATCH] Hide "delete" button when editing contact of wallet account (#9030) Wallet accounts can't be deleted from the contact list. This button never worked, nor should it. --- .../edit-contact/edit-contact.component.js | 41 ++++++++++++++----- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js index 92079c3d5..efc8d577e 100644 --- a/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js +++ b/ui/app/pages/settings/contact-list-tab/edit-contact/edit-contact.component.js @@ -23,6 +23,7 @@ export default class EditContact extends PureComponent { viewRoute: PropTypes.string, listRoute: PropTypes.string, setAccountLabel: PropTypes.func, + showingMyAccounts: PropTypes.bool.isRequired, } static defaultProps = { @@ -40,22 +41,40 @@ export default class EditContact extends PureComponent { render () { const { t } = this.context - const { history, name, addToAddressBook, removeFromAddressBook, address, chainId, memo, viewRoute, listRoute, setAccountLabel } = this.props + const { + address, + addToAddressBook, + chainId, + history, + listRoute, + memo, + name, + removeFromAddressBook, + setAccountLabel, + showingMyAccounts, + viewRoute, + } = this.props return (
- + { + showingMyAccounts + ? null + : ( + + ) + }