Dispose wallet in tests
MODIFY
WalletWasabi.Tests/IntegrationTests/P2pTests.cs
WalletWasabi.Tests/IntegrationTests/P2pTests.cs
@@ -94,7 +94,7 @@ namespace WalletWasabi.Tests.IntegrationTests
KeyManager keyManager = KeyManager.CreateNew(out _, "password");
WasabiSynchronizer syncer = new WasabiSynchronizer(network, bitcoinStore, new Uri("http://localhost:12345"), Global.Instance.TorSocks5Endpoint);
- Wallet wallet = new Wallet(
+ using Wallet wallet = new Wallet(
bitcoinStore,
keyManager,
syncer,

MODIFY
WalletWasabi.Tests/RegressionTests/BuildTests.cs
WalletWasabi.Tests/RegressionTests/BuildTests.cs
@@ -59,7 +59,7 @@ namespace WalletWasabi.Tests.RegressionTests
// 5. Create wallet service.
var workDir = Common.GetWorkDir();
- var wallet = new Wallet(bitcoinStore, keyManager, synchronizer, nodes, workDir, serviceConfiguration, synchronizer);
+ using var wallet = new Wallet(bitcoinStore, keyManager, synchronizer, nodes, workDir, serviceConfiguration, synchronizer);
wallet.NewFilterProcessed += Common.Wallet_NewFilterProcessed;
var scp = new Key().ScriptPubKey;

MODIFY
WalletWasabi.Tests/RegressionTests/CoinJoinTests.cs
WalletWasabi.Tests/RegressionTests/CoinJoinTests.cs
@@ -1312,11 +1312,11 @@ namespace WalletWasabi.Tests.RegressionTests
// 5. Create wallet service.
var workDir = Common.GetWorkDir();
- var wallet = new Wallet(bitcoinStore, keyManager, synchronizer, nodes, workDir, serviceConfiguration, synchronizer);
+ using var wallet = new Wallet(bitcoinStore, keyManager, synchronizer, nodes, workDir, serviceConfiguration, synchronizer);
wallet.NewFilterProcessed += Common.Wallet_NewFilterProcessed;
var workDir2 = Path.Combine(Common.GetWorkDir(), "2");
- var wallet2 = new Wallet(bitcoinStore, keyManager2, synchronizer2, nodes2, workDir2, serviceConfiguration, synchronizer2);
+ using var wallet2 = new Wallet(bitcoinStore, keyManager2, synchronizer2, nodes2, workDir2, serviceConfiguration, synchronizer2);
// Get some money, make it confirm.
var key = keyManager.GetNextReceiveKey("fundZeroLink", out _);

MODIFY
WalletWasabi.Tests/RegressionTests/SendTests.cs
WalletWasabi.Tests/RegressionTests/SendTests.cs
@@ -699,7 +699,7 @@ namespace WalletWasabi.Tests.RegressionTests
// 5. Create wallet service.
var workDir = Common.GetWorkDir();
- var wallet = new Wallet(bitcoinStore, keyManager, synchronizer, nodes, workDir, serviceConfiguration, synchronizer);
+ using var wallet = new Wallet(bitcoinStore, keyManager, synchronizer, nodes, workDir, serviceConfiguration, synchronizer);
wallet.NewFilterProcessed += Common.Wallet_NewFilterProcessed;
Assert.Empty(wallet.Coins);

MODIFY
WalletWasabi.Tests/RegressionTests/WalletTests.cs
WalletWasabi.Tests/RegressionTests/WalletTests.cs
@@ -296,7 +296,7 @@ namespace WalletWasabi.Tests.RegressionTests
// 4. Create wallet service.
var workDir = Common.GetWorkDir();
- var wallet = new Wallet(bitcoinStore, keyManager, synchronizer, nodes, workDir, serviceConfiguration, synchronizer);
+ using var wallet = new Wallet(bitcoinStore, keyManager, synchronizer, nodes, workDir, serviceConfiguration, synchronizer);
wallet.NewFilterProcessed += Common.Wallet_NewFilterProcessed;
// Get some money, make it confirm.

Dispose wallet in tests