reset some options if amount is changed
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/FeeChartViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/FeeChartViewModel.cs
@@ -213,21 +213,14 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
break;
}
}
-
- foreach (var item in correctedFeeEstimates.ToList())
- {
- if (item.Value > maxFee.SatoshiPerByte)
- {
- correctedFeeEstimates.Remove(item.Key);
- }
- }
}
var confirmationTargetValues = xts.ToArray();
var satoshiPerByteValues = yts.ToArray();
List<string> confirmationTargetLabels = new();
- for (int i = 0; i < xts.Count; i += (xts.Count / 5))
+ var numberOfLabels = 5;
+ for (int i = 0; i < xts.Count; i += xts.Count / numberOfLabels)
{
var label = FeeTargetTimeConverter.Convert((int)xts[i], "m", "h", "h", "d", "d");
confirmationTargetLabels.Add(label);

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -74,9 +74,6 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
.Skip(1)
.Subscribe(ParseToField);
- this.WhenAnyValue(x => x.AmountBtc)
- .Subscribe(x => _transactionInfo.Amount = new Money(x, MoneyUnit.BTC));
-
this.WhenAnyValue(x => x.PayJoinEndPoint)
.Subscribe(endPoint =>
{
@@ -119,6 +116,15 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
NextCommand = ReactiveCommand.Create(() =>
{
+ var amount = new Money(AmountBtc, MoneyUnit.BTC);
+
+ if (_transactionInfo.Amount != amount)
+ {
+ _transactionInfo.ResetAmountSpecificOptions();
+ }
+
+ _transactionInfo.Amount = amount;
+
Navigate().To(new TransactionPreviewViewModel(wallet, _transactionInfo));
}, nextCommandCanExecute);

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionInfo.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/TransactionInfo.cs
@@ -40,5 +40,11 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
public bool IsPrivatePocketUsed => Coins.All(x => x.HdPubKey.AnonymitySet >= _privateCoinThreshold);
public bool SubtractFee { get; set; }
+
+ public void ResetAmountSpecificOptions()
+ {
+ SubtractFee = default;
+ MaximumPossibleFeeRate = default;
+ }
}
}

reset some options if amount is changed