do not set the feeRate inside of the dialog. Only if returned.
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendFeeAdvancedOptionsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendFeeAdvancedOptionsViewModel.cs
@@ -47,16 +47,14 @@ public partial class SendFeeAdvancedOptionsViewModel : DialogViewModelBase<FeeRa
{
if (decimal.TryParse(CustomFee, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var feeRate))
{
- _transactionInfo.FeeRate = new FeeRate(feeRate);
_transactionInfo.IsCustomFeeUsed = true;
+ Close(DialogResultKind.Normal, new FeeRate(feeRate));
}
- else if (_transactionInfo.IsCustomFeeUsed)
+ else
{
- _transactionInfo.FeeRate = FeeRate.Zero;
_transactionInfo.IsCustomFeeUsed = false;
+ Close();
}
-
- Close(DialogResultKind.Normal, _transactionInfo.FeeRate);
}
private void ValidateCustomFee(IValidationErrors errors)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionPreviewViewModel.cs
@@ -186,17 +186,18 @@ public partial class TransactionPreviewViewModel : RoutableViewModel
if (_info.IsCustomFeeUsed)
{
var customFeeResult = await NavigateDialogAsync(new SendFeeAdvancedOptionsViewModel(_info), NavigationTarget.CompactDialogScreen);
- if (customFeeResult.Kind == DialogResultKind.Normal && customFeeResult.Result is { })
+ if (customFeeResult.Kind == DialogResultKind.Normal && customFeeResult.Result is { } customFeeRate)
{
+ _info.FeeRate = customFeeRate;
await BuildAndUpdateAsync(BuildTransactionReason.FeeChanged);
}
}
else
{
var feeRateDialogResult = await NavigateDialogAsync(new SendFeeViewModel(_wallet, _info, false));
-
- if (feeRateDialogResult.Kind == DialogResultKind.Normal && feeRateDialogResult.Result is { })
+ if (feeRateDialogResult.Kind == DialogResultKind.Normal && feeRateDialogResult.Result is { } feeRate)
{
+ _info.FeeRate = feeRate;
await BuildAndUpdateAsync(BuildTransactionReason.FeeChanged);
}
}

do not set the feeRate inside of the dialog. Only if returned.