Fix max logic
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendControlView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/SendControlView.xaml
</i:Interaction.Behaviors>
</controls:ExtendedTextBox>
- <controls:ExtendedTextBox IsVisible="{Binding IsCustomChangeAddress}" Classes="monospaceFont" Text="{Binding CustomChangeAddress}" Watermark="(Optional) Custom Change Address" UseFloatingWatermark="True">
+ <controls:ExtendedTextBox IsEnabled="{Binding !IsMax}" IsVisible="{Binding IsCustomChangeAddress}" Classes="monospaceFont" Text="{Binding CustomChangeAddress}" Watermark="(Optional) Custom Change Address" UseFloatingWatermark="True">
<i:Interaction.Behaviors>
<behaviors:PasteAddressOnClickBehavior />
</i:Interaction.Behaviors>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/SendControlViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/SendControlViewModel.cs
@@ -211,6 +211,8 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
SetAmountIfMax();
LabelToolTip = "Spending whole coins does not generate change, thus labeling is unnecessary.";
+
+ CustomChangeAddress = "";
}
else
{
@@ -829,6 +831,11 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
return ErrorDescriptors.Empty;
}
+ if (IsMax)
+ {
+ return new ErrorDescriptors(new ErrorDescriptor(ErrorSeverity.Error, "Spending whole coins does not generate change."));
+ }
+
if (Address?.Trim() == CustomChangeAddress.Trim())
{
return new ErrorDescriptors(new ErrorDescriptor(ErrorSeverity.Error, "The active address and the change addresses cannot be the same."));

Fix max logic