Make sure unconfirmed transactions are not lost at wallet crash
MODIFY
WalletWasabi/Services/WalletService.cs
WalletWasabi/Services/WalletService.cs
@@ -238,6 +238,7 @@ namespace WalletWasabi.Services
// Load in dummy mempool
if (File.Exists(TransactionsFilePath))
{
+ var deleteTxFile = false;
try
{
string jsonString = File.ReadAllText(TransactionsFilePath, Encoding.UTF8);
@@ -251,15 +252,19 @@ namespace WalletWasabi.Services
}
catch (Exception ex)
{
+ deleteTxFile = true;
Logger.LogWarning<WalletService>(ex);
}
}
}
catch (Exception ex)
{
+ deleteTxFile = true;
Logger.LogWarning<WalletService>(ex);
}
+ if (deleteTxFile)
+ {
try
{
File.Delete(TransactionsFilePath);
@@ -271,6 +276,7 @@ namespace WalletWasabi.Services
}
}
}
+ }
Coins.CollectionChanged += Coins_CollectionChanged;
RefreshCoinsHistoriesAsync();
}

Make sure unconfirmed transactions are not lost at wallet crash