Fix bug when changing viewmodels on startup page.
MODIFY
WalletWasabi.Gui/Converters/ErrorDescriptorToBorderColorConverter.cs
WalletWasabi.Gui/Converters/ErrorDescriptorToBorderColorConverter.cs
@@ -28,7 +28,7 @@ namespace WalletWasabi.Gui.Converters
{
if (!descriptors.HasErrors) return null;
- var highPrioError = descriptors.OrderByDescending(p => p.Severity).Single();
+ var highPrioError = descriptors.OrderByDescending(p => p.Severity).FirstOrDefault();
if (ErrorSeverityColorConverter.ErrorSeverityColors.TryGetValue(highPrioError.Severity, out var brush))
{

MODIFY
WalletWasabi.Gui/Converters/ErrorDescriptorsJsonConverter.cs
WalletWasabi.Gui/Converters/ErrorDescriptorsJsonConverter.cs
@@ -34,9 +34,17 @@ namespace WalletWasabi.Gui.Converters
foreach (var exMsg in exList.Select(p => p.Message)
.Where(p => p != null))
+ {
+ try
{
errors.AddRange(JsonConvert.DeserializeObject<ErrorDescriptors>(exMsg));
}
+ catch (Exception e)
+ {
+ errors.Add(new ErrorDescriptor(ErrorSeverity.Error, e.Message));
+ errors.Add(new ErrorDescriptor(ErrorSeverity.Error, exMsg));
+ }
+ }
return errors;
}

Fix bug when changing viewmodels on startup page.