Wallet Settings + Coinjoin Profiles
MODIFY
WalletWasabi.Fluent/ViewModels/CoinJoinProfiles/CoinJoinProfilesViewModel.cs
WalletWasabi.Fluent/ViewModels/CoinJoinProfiles/CoinJoinProfilesViewModel.cs
@@ -63,6 +63,7 @@ public partial class CoinJoinProfilesViewModel : DialogViewModelBase<bool>
keyManager.SetAnonScoreTarget(selected.AnonScoreTarget, toFile: false);
keyManager.SetFeeRateMedianTimeFrame(selected.FeeRateMedianTimeFrameHours, toFile: false);
keyManager.IsCoinjoinProfileSelected = true;
+ keyManager.CoinjoinProfile = selected.Title;
if (isNewWallet)
{

MODIFY
WalletWasabi.Fluent/ViewModels/CoinJoinProfiles/ManualCoinJoinProfileViewModel.cs
WalletWasabi.Fluent/ViewModels/CoinJoinProfiles/ManualCoinJoinProfileViewModel.cs
@@ -9,7 +9,7 @@ public class ManualCoinJoinProfileViewModel : CoinJoinProfileViewModelBase
FeeRateMedianTimeFrameHours = feeRateMedianTimeFrameHours;
}
- public override string Title => "Manual";
+ public override string Title => "Custom";
public override string Description => "";

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletSettingsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletSettingsViewModel.cs
+using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
+using System.Threading.Tasks;
using System.Windows.Input;
using NBitcoin;
using ReactiveUI;
@@ -19,6 +21,8 @@ public partial class WalletSettingsViewModel : RoutableViewModel
[AutoNotify] private bool _autoCoinJoin;
[AutoNotify] private int _anonScoreTarget;
[AutoNotify] private string _plebStopThreshold;
+ [AutoNotify] private string? _selectedCoinjoinProfileName;
+ [AutoNotify] private bool _isCoinjoinProfileSelected;
private Wallet _wallet;
@@ -66,6 +70,8 @@ public partial class WalletSettingsViewModel : RoutableViewModel
}
});
+ SelectCoinjoinProfileCommand = ReactiveCommand.CreateFromTask(SelectCoinjoinProfileAsync);
+
_anonScoreTarget = _wallet.KeyManager.AnonScoreTarget;
this.WhenAnyValue(x => x.AnonScoreTarget)
@@ -98,6 +104,8 @@ public partial class WalletSettingsViewModel : RoutableViewModel
public ICommand SetAutoCoinJoin { get; }
+ public ICommand SelectCoinjoinProfileCommand { get; }
+
public ICommand VerifyRecoveryWordsCommand { get; }
protected override void OnNavigatedTo(bool isInHistory, CompositeDisposable disposables)
@@ -105,6 +113,20 @@ public partial class WalletSettingsViewModel : RoutableViewModel
base.OnNavigatedTo(isInHistory, disposables);
PlebStopThreshold = _wallet.KeyManager.PlebStopThreshold.ToString();
AnonScoreTarget = _wallet.KeyManager.AnonScoreTarget;
+
+ IsCoinjoinProfileSelected = _wallet.KeyManager.IsCoinjoinProfileSelected;
+ SelectedCoinjoinProfileName =
+ (_wallet.KeyManager.IsCoinjoinProfileSelected, _wallet.KeyManager.CoinjoinProfile) switch
+ {
+ (true, string x) => x,
+ (true, null) => "[unknown]",
+ (false, _) => "none"
+ };
+ }
+
+ private async Task SelectCoinjoinProfileAsync()
+ {
+ await NavigateDialogAsync(new CoinJoinProfilesViewModel(_wallet.KeyManager, false), NavigationTarget.DialogScreen);
}
private void ValidatePlebStopThreshold(IValidationErrors errors) =>

MODIFY
WalletWasabi.Fluent/Views/Wallets/WalletSettingsView.axaml
WalletWasabi.Fluent/Views/Wallets/WalletSettingsView.axaml
<TextBox Text="{Binding PlebStopThreshold}" />
</StackPanel>
- <Separator />
-
- <StackPanel Spacing="10" ToolTip.Tip="Minimum anonymity score for a coin to be considered private.">
- <TextBlock Text="Anonymity score target" />
- <DockPanel>
- <PathIcon DockPanel.Dock="Left" Foreground="{StaticResource PrivacyLevelStrongBrush}"
- Data="{StaticResource privacy_strong}" />
- <TextBlock MinWidth="24" DockPanel.Dock="Right" Text="{Binding AnonScoreTarget}" VerticalAlignment="Center" />
- <Slider Minimum="2" Maximum="300" Value="{Binding AnonScoreTarget}" Margin="10 0" />
+ <DockPanel IsVisible="{Binding IsCoinjoinProfileSelected}">
+ <TextBlock Text="Coinjoin strategy:" VerticalAlignment="Center" DockPanel.Dock="Left" Margin="0" />
+ <Button Content="Change" Command="{Binding SelectCoinjoinProfileCommand}" DockPanel.Dock="Right" />
+ <TextBlock Text="{Binding SelectedCoinjoinProfileName}" VerticalAlignment="Center" MinWidth="120" Margin="10 0 10 0" />
</DockPanel>
</StackPanel>
- </StackPanel>
<Separator />

MODIFY
WalletWasabi/Blockchain/Keys/KeyManager.cs
WalletWasabi/Blockchain/Keys/KeyManager.cs
@@ -176,6 +176,9 @@ public class KeyManager
[JsonProperty(Order = 15, PropertyName = "IsCoinjoinProfileSelected")]
public bool IsCoinjoinProfileSelected { get; set; } = false;
+ [JsonProperty(Order = 16, PropertyName = "CoinjoinProfile")]
+ public string CoinjoinProfile { get; set; }
+
[JsonProperty(Order = 999)]
private List<HdPubKey> HdPubKeys { get; }

Wallet Settings + Coinjoin Profiles