Remove simple memoize from required validator

This commit is contained in:
Germán Martínez 2019-09-19 01:30:31 +02:00
parent 7fdf4d3534
commit 27d7979b54
2 changed files with 1 additions and 2 deletions

View File

@ -18,7 +18,7 @@ export const simpleMemoize = (fn: Function) => {
type Field = boolean | string | null | typeof undefined
export const required = simpleMemoize((value: Field) => (value ? undefined : 'Required'))
export const required = (value: Field) => (value ? undefined : 'Required')
export const mustBeInteger = (value: string) => (!Number.isInteger(Number(value)) || value.includes('.') ? 'Must be an integer' : undefined)

View File

@ -52,7 +52,6 @@ export const safeFieldsValidation = async (values: Object) => {
const web3 = getWeb3()
if (!safeAddress || mustBeEthereumAddress(safeAddress) !== undefined) {
errors[FIELD_LOAD_ADDRESS] = 'Required'
return errors
}