Skip to content

Commit

Permalink
Unify naming of wallet settings views and view models
Browse files Browse the repository at this point in the history
  • Loading branch information
wieslawsoltes committed Mar 14, 2024
1 parent a5b5251 commit 86efd19
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Settings;
NavBarPosition = NavBarPosition.None,
NavigationTarget = NavigationTarget.DialogScreen,
Searchable = false)]
public partial class CoinJoinSettingsViewModel : RoutableViewModel
public partial class WalletCoinJoinSettingsViewModel : RoutableViewModel
{
private readonly IWalletModel _wallet;
[AutoNotify] private bool _autoCoinJoin;
Expand All @@ -28,7 +28,7 @@ public partial class CoinJoinSettingsViewModel : RoutableViewModel
[AutoNotify] private string _plebStopThreshold;
[AutoNotify] private string? _selectedCoinjoinProfileName;

private CoinJoinSettingsViewModel(IWalletModel walletModel)
private WalletCoinJoinSettingsViewModel(IWalletModel walletModel)
{
_wallet = walletModel;
_autoCoinJoin = _wallet.Settings.AutoCoinjoin;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public WalletSettingsViewModel(UiContext uiContext, IWalletModel walletModel)
IsHardwareWallet = walletModel.IsHardwareWallet;
IsWatchOnly = walletModel.IsWatchOnlyWallet;

CoinJoinSettings = new CoinJoinSettingsViewModel(UiContext, walletModel);
WalletCoinJoinSettings = new WalletCoinJoinSettingsViewModel(UiContext, walletModel);

SetupCancel(enableCancel: false, enableCancelOnEscape: true, enableCancelOnPressed: true);

NextCommand = CancelCommand;

VerifyRecoveryWordsCommand = ReactiveCommand.Create(() => Navigate().To().VerifyRecoveryWords(walletModel));
VerifyRecoveryWordsCommand = ReactiveCommand.Create(() => Navigate().To().WalletVerifyRecoveryWords(walletModel));

this.WhenAnyValue(x => x.PreferPsbtWorkflow)
.Skip(1)
Expand All @@ -62,7 +62,7 @@ public WalletSettingsViewModel(UiContext uiContext, IWalletModel walletModel)

public bool IsWatchOnly { get; }

public CoinJoinSettingsViewModel CoinJoinSettings { get; private set; }
public WalletCoinJoinSettingsViewModel WalletCoinJoinSettings { get; private set; }

public ICommand VerifyRecoveryWordsCommand { get; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
namespace WalletWasabi.Fluent.ViewModels.Wallets.Settings;

[NavigationMetaData(Title = "Verify Recovery Words")]
public partial class VerifyRecoveryWordsViewModel : RoutableViewModel
public partial class WalletVerifyRecoveryWordsViewModel : RoutableViewModel
{
[AutoNotify] private IEnumerable<string>? _suggestions;
[AutoNotify] private Mnemonic? _currentMnemonics;

private VerifyRecoveryWordsViewModel(IWalletModel wallet)
private WalletVerifyRecoveryWordsViewModel(IWalletModel wallet)
{
_suggestions = new Mnemonic(Wordlist.English, WordCount.Twelve).WordList.GetWords();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
xmlns:vm="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Settings"
x:DataType="vm:CoinJoinSettingsViewModel"
x:Class="WalletWasabi.Fluent.Views.Wallets.Settings.CoinJoinSettingsView"
x:DataType="vm:WalletCoinJoinSettingsViewModel"
x:Class="WalletWasabi.Fluent.Views.Wallets.Settings.WalletCoinJoinSettingsView"
x:CompileBindings="True">

<StackPanel Spacing="20">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace WalletWasabi.Fluent.Views.Wallets.Settings;

public class VerifyRecoveryWordsView : UserControl
public class WalletCoinJoinSettingsView : UserControl
{
public VerifyRecoveryWordsView()
public WalletCoinJoinSettingsView()
{
InitializeComponent();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@

<TabItem Header="Coinjoin" IsVisible="{Binding !IsWatchOnly}">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<v:CoinJoinSettingsView DataContext="{Binding CoinJoinSettings}" />
<v:WalletCoinJoinSettingsView DataContext="{Binding WalletCoinJoinSettings}" />
</ScrollViewer>
</TabItem>

<TabItem Header="Tools" IsVisible="{Binding !IsWatchOnly}">
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
<v:WalletBackupView />
<v:WalletToolsView />
</ScrollViewer>
</TabItem>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:vm="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Settings"
x:DataType="vm:WalletSettingsViewModel"
x:CompileBindings="True"
x:Class="WalletWasabi.Fluent.Views.Wallets.Settings.WalletBackupView">
x:Class="WalletWasabi.Fluent.Views.Wallets.Settings.WalletToolsView">

<StackPanel Spacing="20">
<TextBlock Classes="h6" Text="Have you checked your wallet backup?" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace WalletWasabi.Fluent.Views.Wallets.Settings;

public class WalletBackupView : UserControl
public class WalletToolsView : UserControl
{
public WalletBackupView()
public WalletToolsView()
{
InitializeComponent();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vm="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Settings"
x:CompileBindings="True"
x:DataType="vm:VerifyRecoveryWordsViewModel"
x:DataType="vm:WalletVerifyRecoveryWordsViewModel"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="WalletWasabi.Fluent.Views.Wallets.Settings.VerifyRecoveryWordsView">
x:Class="WalletWasabi.Fluent.Views.Wallets.Settings.WalletVerifyRecoveryWordsView">
<ContentArea Title="{Binding Title}"
NextContent="Verify" EnableNext="True" EnableBack="True" EnableCancel="True">
<DockPanel VerticalAlignment="Top">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

namespace WalletWasabi.Fluent.Views.Wallets.Settings;

public class CoinJoinSettingsView : UserControl
public class WalletVerifyRecoveryWordsView : UserControl
{
public CoinJoinSettingsView()
public WalletVerifyRecoveryWordsView()
{
InitializeComponent();
}
Expand Down

0 comments on commit 86efd19

Please sign in to comment.