Skip to content
Permalink
Browse files

[skip ci] Autocorrect AddressManager to FormatException

Resolves #880
  • Loading branch information...
nopara73 committed Nov 23, 2018
1 parent 98e59e8 commit cbd8a2e4d48df284466a7a9a0513e3e6369c8514
Showing with 9 additions and 0 deletions.
  1. +9 −0 WalletWasabi.Gui/Global.cs
@@ -173,6 +173,15 @@ public static void InitializeNoWallet()
AddressManager = new AddressManager();
Logger.LogInfo<AddressManager>($"{nameof(AddressManager)} autocorrection is successful.");
}
catch (FormatException ex)
{
// https://github.com/zkSNACKs/WalletWasabi/issues/880
Logger.LogInfo<AddressManager>($"{nameof(AddressManager)} has thrown `{nameof(FormatException)}`. Attempting to autocorrect.");
File.Delete(AddressManagerFilePath);
Logger.LogTrace<AddressManager>(ex);
AddressManager = new AddressManager();
Logger.LogInfo<AddressManager>($"{nameof(AddressManager)} autocorrection is successful.");
}
}

connectionParameters.TemplateBehaviors.Add(new AddressManagerBehavior(AddressManager));

0 comments on commit cbd8a2e

Please sign in to comment.
You can’t perform that action at this time.