diff --git a/src/components/settings/fees/CollaboratorFeesForm.schema.ts b/src/components/settings/fees/CollaboratorFeesForm.schema.ts index 25d76ce8..6732cf0d 100644 --- a/src/components/settings/fees/CollaboratorFeesForm.schema.ts +++ b/src/components/settings/fees/CollaboratorFeesForm.schema.ts @@ -1,7 +1,7 @@ import type { TFunction } from 'i18next' import * as yup from 'yup' import { CJ_FEE_ABS_MAX, CJ_FEE_ABS_MIN, CJ_FEE_REL_MAX, CJ_FEE_REL_MIN } from '@/constants/jam' -import { factorToPercentage, formatSats, isValidInteger } from '@/lib/utils' +import { factorToPercentage, formatSats, isValidInteger, isValidNumber } from '@/lib/utils' import type { AmountSats } from '@/types/global' export type CollaboratorFeesFormValues = { @@ -34,7 +34,7 @@ export function createCollaboratorFeesFormSchema({ .required(maxCjFeeAbsoluteMessage), maxCjFeeRelInPercent: yup .number() - .transform((value) => (isValidInteger(value) ? value : null)) + .transform((value) => (isValidNumber(value) ? value : null)) .min(factorToPercentage(CJ_FEE_REL_MIN), maxCjFeeRelativeMessage) .max(factorToPercentage(CJ_FEE_REL_MAX), maxCjFeeRelativeMessage) .required(maxCjFeeRelativeMessage),