1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Make username mandatory when adding to address book (#17044)

This commit is contained in:
amerkadicE 2023-01-06 17:36:32 +01:00 committed by GitHub
parent be227705d0
commit 6ace8955d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -143,7 +143,11 @@ export default class AddContact extends PureComponent {
</div>
<PageContainerFooter
cancelText={this.context.t('cancel')}
disabled={Boolean(this.state.error || !this.state.ethAddress)}
disabled={Boolean(
this.state.error ||
!this.state.ethAddress ||
!this.state.newName.trim(),
)}
onSubmit={async () => {
await addToAddressBook(
domainResolution || this.state.ethAddress,