add warning if user selects private funds.
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
@@ -27,6 +27,8 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
[AutoNotify] private decimal _stillNeeded;
[AutoNotify] private bool _enoughSelected;
+ [AutoNotify] private bool _privateFundsSelected;
+ [AutoNotify] private bool _showCjNotice;
public PrivacyControlViewModel(Wallet wallet, TransactionInfo transactionInfo, TransactionBroadcaster broadcaster)
{
@@ -47,8 +49,13 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
selected.Sum(x => x.TotalBtc)
.Subscribe(x =>
{
+ PrivateFundsSelected = selectedList.Items.Any(pocket =>
+ pocket.Labels.FirstOrDefault() == CoinPocketHelper.PrivateFundsText);
+
StillNeeded = transactionInfo.Amount.ToDecimal(MoneyUnit.BTC) - x;
- EnoughSelected = StillNeeded <= 0;
+ EnoughSelected = StillNeeded <= 0 || PrivateFundsSelected;
+
+ ShowCjNotice = !PrivateFundsSelected && EnoughSelected;
});
StillNeeded = transactionInfo.Amount.ToDecimal(MoneyUnit.BTC);

MODIFY
WalletWasabi.Fluent/Views/Wallets/Send/PrivacyControlView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/PrivacyControlView.axaml
ScrollViewer.VerticalScrollBarVisibility="Disabled">
<DockPanel>
<Panel MinHeight="60" DockPanel.Dock="Bottom">
- <c:InfoMessage x:Name="AmountWarning" Foreground="{DynamicResource WarningMessageForeground}" HorizontalAlignment="Center"
+ <c:InfoMessage Foreground="{DynamicResource WarningMessageForeground}" HorizontalAlignment="Center"
VerticalAlignment="Top" IsVisible="{Binding !EnoughSelected}">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Insufficient funds selected. Select at least another " />
<TextBlock Text=" BTC" />
</StackPanel>
</c:InfoMessage>
- <c:InfoMessage IsVisible="{Binding !#AmountWarning.IsVisible}"
+ <c:InfoMessage IsVisible="{Binding ShowCjNotice}"
Content="Not in a hurry? Consider making more of your funds private by CoinJoining before making this transaction."
HorizontalAlignment="Center" VerticalAlignment="Top" />
+ <c:InfoMessage VerticalAlignment="Top"
+ Foreground="{DynamicResource WarningMessageForeground}"
+ IsVisible="{Binding PrivateFundsSelected}"
+ Content="Warning! Using both private and non-private funds in the same transaction can destroy your privacy." />
</Panel>
<DataGrid AutoGenerateColumns="False"
Margin="0 20"

add warning if user selects private funds.