|
|
@ -71,25 +71,6 @@ export default class ConfirmPageContainer extends Component { |
|
|
|
contact: PropTypes.object, |
|
|
|
contact: PropTypes.object, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
maybeRenderAddContact() { |
|
|
|
|
|
|
|
const { t } = this.context; |
|
|
|
|
|
|
|
const { showAddToAddressBookModal, toAddress, contact = {} } = this.props; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (contact.name || toAddress === undefined) { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
|
|
|
<Dialog |
|
|
|
|
|
|
|
type="message" |
|
|
|
|
|
|
|
className="send__dialog" |
|
|
|
|
|
|
|
onClick={() => showAddToAddressBookModal()} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{t('newAccountDetectedDialogMessage')} |
|
|
|
|
|
|
|
</Dialog> |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render() { |
|
|
|
render() { |
|
|
|
const { |
|
|
|
const { |
|
|
|
showEdit, |
|
|
|
showEdit, |
|
|
@ -136,9 +117,14 @@ export default class ConfirmPageContainer extends Component { |
|
|
|
editingGas, |
|
|
|
editingGas, |
|
|
|
handleCloseEditGas, |
|
|
|
handleCloseEditGas, |
|
|
|
currentTransaction, |
|
|
|
currentTransaction, |
|
|
|
|
|
|
|
showAddToAddressBookModal, |
|
|
|
|
|
|
|
contact = {}, |
|
|
|
} = this.props; |
|
|
|
} = this.props; |
|
|
|
const renderAssetImage = contentComponent || !identiconAddress; |
|
|
|
const renderAssetImage = contentComponent || !identiconAddress; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const showAddToAddressDialog = |
|
|
|
|
|
|
|
contact.name === undefined && toAddress !== undefined; |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<div className="page-container"> |
|
|
|
<div className="page-container"> |
|
|
|
<ConfirmPageContainerNavigation |
|
|
|
<ConfirmPageContainerNavigation |
|
|
@ -171,7 +157,17 @@ export default class ConfirmPageContainer extends Component { |
|
|
|
/> |
|
|
|
/> |
|
|
|
)} |
|
|
|
)} |
|
|
|
</ConfirmPageContainerHeader> |
|
|
|
</ConfirmPageContainerHeader> |
|
|
|
<div>{this.maybeRenderAddContact()}</div> |
|
|
|
<div> |
|
|
|
|
|
|
|
{showAddToAddressDialog && ( |
|
|
|
|
|
|
|
<Dialog |
|
|
|
|
|
|
|
type="message" |
|
|
|
|
|
|
|
className="send__dialog" |
|
|
|
|
|
|
|
onClick={() => showAddToAddressBookModal()} |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
{this.context.t('newAccountDetectedDialogMessage')} |
|
|
|
|
|
|
|
</Dialog> |
|
|
|
|
|
|
|
)} |
|
|
|
|
|
|
|
</div> |
|
|
|
{contentComponent || ( |
|
|
|
{contentComponent || ( |
|
|
|
<ConfirmPageContainerContent |
|
|
|
<ConfirmPageContainerContent |
|
|
|
action={action} |
|
|
|
action={action} |
|
|
|