Merge pull request #829 from gnosis/development

Apps form validation hotfix
This commit is contained in:
nicolas 2020-04-28 12:32:40 -03:00 committed by GitHub
commit 4b67153411
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -7,7 +7,7 @@ import { Field } from 'react-final-form'
type Props = { type Props = {
validate: () => void, validate: () => void,
debounce: number, debounce?: number,
} }
const DebounceValidationField = ({ debounce = 1000, validate, ...rest }: Props) => { const DebounceValidationField = ({ debounce = 1000, validate, ...rest }: Props) => {

View File

@ -10,7 +10,7 @@ import { getAppInfoFromUrl } from './utils'
import Field from '~/components/forms/Field' import Field from '~/components/forms/Field'
import DebounceValidationField from '~/components/forms/Field/DebounceValidationField' import DebounceValidationField from '~/components/forms/Field/DebounceValidationField'
import GnoForm from '~/components/forms/GnoForm' import GnoForm from '~/components/forms/GnoForm'
import { composeValidators, required } from '~/components/forms/validator' import { required } from '~/components/forms/validator'
import Img from '~/components/layout/Img' import Img from '~/components/layout/Img'
import appsIconSvg from '~/routes/safe/components/Transactions/TxsTable/TxType/assets/appsIcon.svg' import appsIconSvg from '~/routes/safe/components/Transactions/TxsTable/TxType/assets/appsIcon.svg'
@ -60,7 +60,7 @@ const composeValidatorsApps = (...validators: Function[]): FieldValidator => (va
if (!meta.modified) { if (!meta.modified) {
return return
} }
return composeValidators(validators) return validators.reduce((error, validator) => error || validator(value), undefined)
} }
const ManageApps = ({ appList, onAppAdded, onAppToggle }: Props) => { const ManageApps = ({ appList, onAppAdded, onAppToggle }: Props) => {