Make sure we load properly.
MODIFY
WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/GenerateWalletViewModel.cs
@@ -55,7 +55,8 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
}
catch (Exception ex)
{
- ValidationMessage = ex.ToString();
+ ValidationMessage = ex.ToTypeMessageString();
+ Logger.LogError<GenerateWalletViewModel>(ex);
}
}
},

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletView.xaml
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletView.xaml
<Grid></Grid>
</DockPanel>
<TextBlock Text="{Binding WarningMessage}" Classes="warningMessage" />
+ <TextBlock Text="{Binding ValidationMessage}" Classes="errorMessage" />
</StackPanel>
</UserControl>

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
@@ -21,6 +21,7 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
private bool _isWalletOpened;
private bool _canLoadWallet;
private string _warningMessage;
+ private string _validationMessage;
private WalletManagerViewModel Owner { get; }
public LoadWalletViewModel(WalletManagerViewModel owner) : base("Load Wallet")
@@ -36,7 +37,7 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
this.WhenAnyValue(x => x.IsWalletOpened)
.Subscribe(isWalletOpened => WarningMessage = isWalletOpened
- ? "There is already an open wallet. Restart the application in order to be able to open a different wallet."
+ ? "There is already an open wallet. Restart the application to open another one."
: string.Empty);
LoadCommand = ReactiveCommand.Create(LoadWalletAsync, this.WhenAnyValue(x => x.CanLoadWallet));
@@ -66,6 +67,12 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
set { this.RaiseAndSetIfChanged(ref _warningMessage, value); }
}
+ public string ValidationMessage
+ {
+ get { return _validationMessage; }
+ set { this.RaiseAndSetIfChanged(ref _validationMessage, value); }
+ }
+
public bool CanLoadWallet
{
get { return _canLoadWallet; }
@@ -89,6 +96,7 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
}
IsWalletOpened = Global.WalletService != null;
+ ValidationMessage = null;
}
public ReactiveCommand LoadCommand { get; }
@@ -115,7 +123,7 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
catch (Exception ex)
{
// Initialization failed.
- // ToDo: Show error messages.
+ ValidationMessage = ex.ToTypeMessageString();
Logger.LogError<LoadWalletViewModel>(ex);
await Global.DisposeInWalletDependentServicesAsync();
}

MODIFY
WalletWasabi.Gui/Tabs/WalletManager/RecoverWalletViewModel.cs
WalletWasabi.Gui/Tabs/WalletManager/RecoverWalletViewModel.cs
@@ -56,7 +56,8 @@ namespace WalletWasabi.Gui.Tabs.WalletManager
}
catch (Exception ex)
{
- ValidationMessage = ex.ToString();
+ ValidationMessage = ex.ToTypeMessageString();
+ Logger.LogError<LoadWalletViewModel>(ex);
}
}
},

Make sure we load properly.