Skip to content

Commit

Permalink
fix: allow absolute maker fee of zero (#727)
Browse files Browse the repository at this point in the history
  • Loading branch information
theborakompanioni authored Mar 11, 2024
1 parent a26aeb8 commit c04a830
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 c04a830

Please sign in to comment.