Skip to content

Commit

Permalink
settings: fix values in coordinator tab (WalletWasabi#13244)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarnixCroes authored Jul 9, 2024
1 parent a7c1138 commit 01709d4
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using WalletWasabi.Fluent.Models.UI;
using WalletWasabi.Fluent.Validation;
using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Helpers;
using WalletWasabi.Models;

namespace WalletWasabi.Fluent.ViewModels.Settings;
Expand Down Expand Up @@ -90,13 +91,13 @@ private void ValidateMaxCoordinationFeeRate(IValidationErrors errors)

if (maxCoordinationFeeRateDecimal < 0)
{
errors.Add(ErrorSeverity.Error, "Cannot be lower than 0.0%");
errors.Add(ErrorSeverity.Error, "Cannot be lower than 0.0");
return;
}

if (maxCoordinationFeeRateDecimal > 1)
if (maxCoordinationFeeRateDecimal > Constants.AbsoluteMaxCoordinationFeeRate)
{
errors.Add(ErrorSeverity.Error, "Absolute maximum coordination fee rate is 1%");
errors.Add(ErrorSeverity.Error, $"Absolute maximum coordination fee rate is {Constants.AbsoluteMaxCoordinationFeeRate}");
return;
}

Expand Down Expand Up @@ -142,9 +143,9 @@ private void ValidateAbsoluteMinInputCount(IValidationErrors errors)
return;
}

if (absoluteMinInputCountInt < 2)
if (absoluteMinInputCountInt < Constants.AbsoluteMinInputCount)
{
errors.Add(ErrorSeverity.Error, "Absolute min input count should be at least 2");
errors.Add(ErrorSeverity.Error, $"Absolute min input count should be at least {Constants.AbsoluteMinInputCount}");
return;
}

Expand Down

0 comments on commit 01709d4

Please sign in to comment.