Unify WalletName access and naming
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletAdvancedViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletAdvancedViewModel.cs
@@ -24,7 +24,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
set => this.RaiseAndSetIfChanged(ref _isExpanded, value);
}
- public WalletAdvancedViewModel(Wallet wallet) : base(wallet.Name)
+ public WalletAdvancedViewModel(Wallet wallet) : base(wallet.WalletName)
{
Items = new ObservableCollection<WasabiDocumentTabViewModel>();

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletInfoViewModel.cs
@@ -27,7 +27,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
private string _extendedAccountPrivateKey;
private string _extendedAccountZprv;
- public WalletInfoViewModel(Wallet wallet) : base(wallet.Name)
+ public WalletInfoViewModel(Wallet wallet) : base(wallet.WalletName)
{
Global = Locator.Current.GetService<Global>();
Wallet = wallet;

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
@@ -29,7 +29,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
Disposables = Disposables is null ? new CompositeDisposable() : throw new NotSupportedException($"Cannot open {GetType().Name} before closing it.");
Actions = new ObservableCollection<WasabiDocumentTabViewModel>();
Global = Locator.Current.GetService<Global>();
- Title = Name;
+ Title = WalletName;
LurkingWifeModeCommand = ReactiveCommand.Create(() =>
{
@@ -51,7 +51,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
try
{
Money balance = Wallet.Coins.TotalAmount();
- Title = $"{Name} ({(Global.UiConfig.LurkingWifeMode ? "#########" : balance.ToString(false, true))} BTC)";
+ Title = $"{WalletName} ({(Global.UiConfig.LurkingWifeMode ? "#########" : balance.ToString(false, true))} BTC)";
}
catch (Exception ex)
{
@@ -75,7 +75,7 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
set => this.RaiseAndSetIfChanged(ref _title, value);
}
- public string Name => Wallet.Name;
+ public string WalletName => Wallet.WalletName;
public KeyManager KeyManager => Wallet.KeyManager;
public Wallet Wallet { get; }
public ReactiveCommand<Unit, Unit> LurkingWifeModeCommand { get; }

MODIFY
WalletWasabi/Blockchain/Keys/KeyManager.cs
WalletWasabi/Blockchain/Keys/KeyManager.cs
@@ -134,6 +134,7 @@ namespace WalletWasabi.Blockchain.Keys
private object ScriptHdPubKeyMapLock { get; }
private object ToFileLock { get; }
+ public string WalletName => string.IsNullOrWhiteSpace(FilePath) ? "" : Path.GetFileNameWithoutExtension(FilePath);
public static KeyManager CreateNew(out Mnemonic mnemonic, string password, string filePath = null)
{

MODIFY
WalletWasabi/Wallets/Wallet.cs
WalletWasabi/Wallets/Wallet.cs
@@ -114,7 +114,7 @@ namespace WalletWasabi.Wallets
public NodesGroup Nodes { get; }
public string BlocksFolderPath { get; }
public ServiceConfiguration ServiceConfiguration { get; }
- public string Name => Path.GetFileNameWithoutExtension(KeyManager.FilePath);
+ public string WalletName => KeyManager.WalletName;
/// <summary>
/// Unspent Transaction Outputs

Unify WalletName access and naming