Rework logic p1
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/RecoverWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/RecoverWalletViewModel.cs
@@ -16,6 +16,7 @@ using WalletWasabi.Fluent.Validation;
using WalletWasabi.Fluent.ViewModels.Dialogs.Base;
using WalletWasabi.Logging;
using WalletWasabi.Models;
+using WalletWasabi.Fluent.ViewModels.CoinJoinProfiles;
namespace WalletWasabi.Fluent.ViewModels.AddWallet;
@@ -85,7 +86,7 @@ public partial class RecoverWalletViewModel : RoutableViewModel
return result;
});
- Navigate().To(new AddedWalletPageViewModel(keyManager));
+ Navigate().To(new CoinJoinProfilesViewModel(keyManager, true));
}
catch (Exception ex)
{

MODIFY
WalletWasabi.Fluent/ViewModels/CoinJoinProfiles/CoinJoinProfilesViewModel.cs
WalletWasabi.Fluent/ViewModels/CoinJoinProfiles/CoinJoinProfilesViewModel.cs
@@ -64,13 +64,13 @@ public partial class CoinJoinProfilesViewModel : DialogViewModelBase<bool>
keyManager.SetFeeRateMedianTimeFrame(selected.FeeRateMedianTimeFrameHours, toFile: false);
keyManager.IsCoinjoinProfileSelected = true;
+ keyManager.ToFile();
if (isNewWallet)
{
Navigate().To(new AddedWalletPageViewModel(keyManager));
}
else
{
- keyManager.ToFile();
Close(DialogResultKind.Normal, true);
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Login/LoginViewModel.cs
WalletWasabi.Fluent/ViewModels/Login/LoginViewModel.cs
@@ -69,11 +69,10 @@ public partial class LoginViewModel : RoutableViewModel
if (legalResult)
{
- if (closedWalletViewModel.Wallet.KeyManager.IsCoinjoinProfileSelected || closedWalletViewModel.Wallet.KeyManager.IsWatchOnly)
- {
- LoginWallet(closedWalletViewModel);
- }
- else
+ var km = closedWalletViewModel.Wallet.KeyManager;
+
+ // This should be impossible, this is just a sanity check
+ if (!km.IsCoinjoinProfileSelected && km.AutoCoinJoin)
{
DialogResult<bool> isProfileSelected = await NavigateDialogAsync(new CoinJoinProfilesViewModel(closedWalletViewModel.Wallet.KeyManager, false), NavigationTarget.DialogScreen);
@@ -86,6 +85,10 @@ public partial class LoginViewModel : RoutableViewModel
wallet.Logout();
}
}
+ else
+ {
+ LoginWallet(closedWalletViewModel);
+ }
}
else
{

Rework logic p1