Fix composeValidators

This commit is contained in:
Germán Martínez 2019-09-09 10:12:03 +02:00
parent 425d481a7d
commit a04757ab59
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ export const uniqueAddress = (addresses: string[] | List<string>) => simpleMemoi
return addressAlreadyExists ? ADDRESS_REPEATED_ERROR : undefined
})
export const composeValidators = (...validators: Function[]): FieldValidator => (value: Field) => validators.reduce((error, validator) => error || validator(value), undefined)
export const composeValidators = (...validators: Function[]): FieldValidator => (value: Field) => validators.reduce((error, validator) => error || (validator && validator(value)), undefined)
export const inLimit = (limit: number, base: number, baseText: string, symbol: string = 'ETH') => (value: string) => {
const amount = Number(value)