Remove Safe name validation

This commit is contained in:
Germán Martínez 2019-09-18 14:48:15 +02:00
parent a02352c54c
commit 1f8ed4eb3b
3 changed files with 1 additions and 17 deletions

View File

@ -50,12 +50,6 @@ export const SAFE_MASTERCOPY_ERROR = 'Mastercopy used by this safe is not the sa
export const safeFieldsValidation = async (values: Object) => {
const errors = {}
const web3 = getWeb3()
const safeName = values[FIELD_LOAD_NAME]
const safeAddress = values[FIELD_LOAD_ADDRESS]
if (!safeName) {
errors[FIELD_LOAD_NAME] = 'Required'
}
if (!safeAddress || mustBeEthereumAddress(safeAddress) !== undefined) {
errors[FIELD_LOAD_ADDRESS] = 'Required'

View File

@ -67,7 +67,7 @@ const Layout = ({
mutators={formMutators}
testId="create-safe-form"
>
<StepperPage validate={safeNameValidation}>{SafeNameField}</StepperPage>
<StepperPage>{SafeNameField}</StepperPage>
<StepperPage>{SafeOwnersFields}</StepperPage>
<StepperPage network={network} userAccount={userAccount}>
{Review}

View File

@ -10,16 +10,6 @@ import Paragraph from '~/components/layout/Paragraph'
import OpenPaper from '~/components/Stepper/OpenPaper'
import { sm, secondary } from '~/theme/variables'
export const safeNameValidation = async (values: Object) => {
const errors = {}
if (!values[FIELD_NAME]) {
errors[FIELD_NAME] = 'Required'
}
return errors
}
type Props = {
classes: Object,
}