diff --git a/src/components/forms/Field/DebounceValidationField.js b/src/components/forms/Field/DebounceValidationField.js index 325946f5..7f32f379 100644 --- a/src/components/forms/Field/DebounceValidationField.js +++ b/src/components/forms/Field/DebounceValidationField.js @@ -7,7 +7,7 @@ import { Field } from 'react-final-form' type Props = { validate: () => void, - debounce: number, + debounce?: number, } const DebounceValidationField = ({ debounce = 1000, validate, ...rest }: Props) => { diff --git a/src/routes/safe/components/Apps/ManageApps.js b/src/routes/safe/components/Apps/ManageApps.js index beb3102c..972477ab 100644 --- a/src/routes/safe/components/Apps/ManageApps.js +++ b/src/routes/safe/components/Apps/ManageApps.js @@ -10,7 +10,7 @@ import { getAppInfoFromUrl } from './utils' import Field from '~/components/forms/Field' import DebounceValidationField from '~/components/forms/Field/DebounceValidationField' 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 appsIconSvg from '~/routes/safe/components/Transactions/TxsTable/TxType/assets/appsIcon.svg' @@ -60,7 +60,7 @@ const composeValidatorsApps = (...validators: Function[]): FieldValidator => (va if (!meta.modified) { return } - return composeValidators(validators) + return validators.reduce((error, validator) => error || validator(value), undefined) } const ManageApps = ({ appList, onAppAdded, onAppToggle }: Props) => {