From 01709d4eeab706b15cfc49b9274d69cf56c1d067 Mon Sep 17 00:00:00 2001 From: Marnix Croes <93143998+MarnixCroes@users.noreply.github.com> Date: Tue, 9 Jul 2024 23:24:59 +0200 Subject: [PATCH] settings: fix values in coordinator tab (#13244) --- .../Settings/CoordinatorTabSettingsViewModel.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/WalletWasabi.Fluent/ViewModels/Settings/CoordinatorTabSettingsViewModel.cs b/WalletWasabi.Fluent/ViewModels/Settings/CoordinatorTabSettingsViewModel.cs index e84a188aa1d..f47de11c41f 100644 --- a/WalletWasabi.Fluent/ViewModels/Settings/CoordinatorTabSettingsViewModel.cs +++ b/WalletWasabi.Fluent/ViewModels/Settings/CoordinatorTabSettingsViewModel.cs @@ -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; @@ -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; } @@ -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; }