Skip to content

Commit

Permalink
fix: allow absolute maker fee of zero
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni committed Mar 11, 2024
1 parent a26aeb8 commit 66e4980
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Earn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const EarnForm = ({
}

if (isRelOffer) {
if (typeof values.feeRel !== 'number' || values.feeRel < feeRelMin || values.feeRel > feeRelMax) {
if (!isValidNumber(values.feeRel) || values.feeRel < feeRelMin || values.feeRel > feeRelMax) {
errors.feeRel = t('earn.feedback_invalid_rel_fee', {
feeRelPercentageMin: `${factorToPercentage(feeRelMin)}%`,
feeRelPercentageMax: `${factorToPercentage(feeRelMax)}%`,
Expand All @@ -234,7 +234,7 @@ const EarnForm = ({
}

if (isAbsOffer) {
if (!isValidAmount(values.feeAbs?.value ?? null, false)) {
if (!isValidNumber(values.feeAbs?.value) || values.feeAbs!.value! < 0) {
errors.feeAbs = t('earn.feedback_invalid_abs_fee')
}
}
Expand Down

0 comments on commit 66e4980

Please sign in to comment.