Make auto coinjoin setting wallet specific
MODIFY
WalletWasabi.Fluent/ViewModels/Settings/PrivacySettingsTabViewModel.cs
WalletWasabi.Fluent/ViewModels/Settings/PrivacySettingsTabViewModel.cs
@@ -10,21 +10,19 @@ namespace WalletWasabi.Fluent.ViewModels.Settings
Caption = "Manage privacy settings",
Order = 1,
Category = "Settings",
- Keywords = new[] { "Settings", "Privacy", "Minimal", "Medium", "Strong", "Anonymity", "Level", "Auto", "CoinJoin" },
+ Keywords = new[] { "Settings", "Privacy", "Minimal", "Medium", "Strong", "Anonymity", "Level" },
IconName = "settings_privacy_regular")]
public partial class PrivacySettingsTabViewModel : SettingsTabViewModelBase
{
[AutoNotify] private int _minimalPrivacyLevel;
[AutoNotify] private int _mediumPrivacyLevel;
[AutoNotify] private int _strongPrivacyLevel;
- [AutoNotify] private bool _autoCoinJoin;
public PrivacySettingsTabViewModel()
{
_minimalPrivacyLevel = Services.Config.PrivacyLevelSome;
_mediumPrivacyLevel = Services.Config.PrivacyLevelFine;
_strongPrivacyLevel = Services.Config.PrivacyLevelStrong;
- _autoCoinJoin = Services.UiConfig.AutoCoinJoin;
this.WhenAnyValue(
x => x.MinimalPrivacyLevel,
@@ -74,11 +72,6 @@ namespace WalletWasabi.Fluent.ViewModels.Settings
MediumPrivacyLevel = x - 1;
}
});
-
- this.WhenAnyValue(x => x.AutoCoinJoin)
- .ObserveOn(RxApp.TaskpoolScheduler)
- .Skip(1)
- .Subscribe(x => Services.UiConfig.AutoCoinJoin = x);
}
protected override void EditConfigOnSave(Config config)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletSettingsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletSettingsViewModel.cs
using System;
+using System.Reactive.Linq;
using ReactiveUI;
using WalletWasabi.Fluent.ViewModels.Navigation;
@@ -7,12 +8,14 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
public partial class WalletSettingsViewModel : RoutableViewModel
{
[AutoNotify] private bool _preferPsbtWorkflow;
+ [AutoNotify] private bool _autoCoinJoin;
public WalletSettingsViewModel(WalletViewModelBase walletViewModelBase)
{
var wallet = walletViewModelBase.Wallet;
Title = $"{wallet.WalletName} - Wallet Settings";
_preferPsbtWorkflow = wallet.KeyManager.PreferPsbtWorkflow;
+ _autoCoinJoin = Services.UiConfig.AutoCoinJoin;
IsHardwareWallet = wallet.KeyManager.IsHardwareWallet;
SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);
@@ -26,6 +29,11 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
wallet.KeyManager.ToFile();
walletViewModelBase.RaisePropertyChanged(nameof(walletViewModelBase.PreferPsbtWorkflow));
});
+
+ this.WhenAnyValue(x => x.AutoCoinJoin)
+ .ObserveOn(RxApp.TaskpoolScheduler)
+ .Skip(1)
+ .Subscribe(x => Services.UiConfig.AutoCoinJoin = x);
}
public bool IsHardwareWallet { get; }

MODIFY
WalletWasabi.Fluent/Views/Settings/PrivacySettingsTabView.axaml
WalletWasabi.Fluent/Views/Settings/PrivacySettingsTabView.axaml
<Slider Minimum="4" Value="{Binding StrongPrivacyLevel}" Margin="10 0" />
</DockPanel>
</StackPanel>
-
- <DockPanel>
- <TextBlock Text="Auto CoinJoin" />
- <ToggleSwitch IsChecked="{Binding AutoCoinJoin}" />
- </DockPanel>
</StackPanel>
</UserControl>

MODIFY
WalletWasabi.Fluent/Views/Wallets/WalletSettingsView.axaml
WalletWasabi.Fluent/Views/Wallets/WalletSettingsView.axaml
<TextBlock Text="PSBT workflow" />
<ToggleSwitch IsChecked="{Binding PreferPsbtWorkflow}" />
</DockPanel>
+
+ <DockPanel>
+ <TextBlock Text="Auto CoinJoin" />
+ <ToggleSwitch IsChecked="{Binding AutoCoinJoin}" />
+ </DockPanel>
</StackPanel>
</c:ContentArea>
</UserControl>

Make auto coinjoin setting wallet specific