diff --git a/src/components/molecules/FormFields/Credential/index.tsx b/src/components/molecules/FormFields/Credential/index.tsx index c8cbb791e..8906e1b19 100644 --- a/src/components/molecules/FormFields/Credential/index.tsx +++ b/src/components/molecules/FormFields/Credential/index.tsx @@ -27,24 +27,18 @@ export default function Credential(props: InputProps) { helpers.setValue(newInput) } - function isCredentialValid(): boolean { + function handleAddValue(e: FormEvent) { + e.preventDefault() if (!isAddress(value)) { toast.error('Wallet address is invalid') - return false + return } if (arrayInput.includes(value)) { toast.error('Wallet address already added into list') - return false - } - return true - } - - function handleAddValue(e: FormEvent) { - e.preventDefault() - if (isCredentialValid()) { - setArrayInput((arrayInput) => [...arrayInput, value]) - setValue('') + return } + setArrayInput((arrayInput) => [...arrayInput, value]) + setValue('') } return ( diff --git a/src/components/organisms/AssetActions/Edit/EditAdvanceSettings.tsx b/src/components/organisms/AssetActions/Edit/EditAdvanceSettings.tsx index a3e4ad52b..00fd691a0 100644 --- a/src/components/organisms/AssetActions/Edit/EditAdvanceSettings.tsx +++ b/src/components/organisms/AssetActions/Edit/EditAdvanceSettings.tsx @@ -123,7 +123,7 @@ export default function EditAdvanceSettings({ {({ isSubmitting, values, initialValues }) => isSubmitting || hasFeedback ? (