Implement dequeue all coins
MODIFY
WalletWasabi.Tests/RegTests.cs
WalletWasabi.Tests/RegTests.cs
@@ -2570,7 +2570,7 @@ namespace WalletWasabi.Tests
coordinator.UpdateRoundConfig(roundConfig);
coordinator.FailAllRoundsInInputRegistration();
Assert.NotEmpty(chaumianClient1.State.GetAllCoins());
- await chaumianClient1.DequeueCoinsFromMixAsync(chaumianClient1.State.GetAllCoins().ToArray());
+ await chaumianClient1.DequeueAllCoinsFromMixAsync();
Assert.Empty(chaumianClient1.State.GetAllCoins());
await chaumianClient1.QueueCoinsToMixAsync(password, smartCoin4);
Assert.NotEmpty(chaumianClient1.State.GetAllCoins());

MODIFY
WalletWasabi/Services/CcjClient.cs
WalletWasabi/Services/CcjClient.cs
@@ -159,7 +159,7 @@ namespace WalletWasabi.Services
states = await SatoshiClient.GetAllRoundStatesAsync();
State.UpdateRoundsByStates(states.ToArray());
- StateUpdated?.Invoke(this, null);
+
if (maxDelayReplySeconds == minDelayReplySeconds)
{
delay = minDelayReplySeconds;
@@ -574,7 +574,7 @@ namespace WalletWasabi.Services
}
}
- internal async Task DequeueCoinsFromMixAsync(params (uint256 txid, uint index)[] coins)
+ public async Task DequeueCoinsFromMixAsync(params (uint256 txid, uint index)[] coins)
{
using (await MixLock.LockAsync())
{
@@ -584,6 +584,14 @@ namespace WalletWasabi.Services
}
}
+ public async Task DequeueAllCoinsFromMixAsync()
+ {
+ using (await MixLock.LockAsync())
+ {
+ await DequeueCoinsFromMixNoLockAsync(State.GetAllCoins().ToArray());
+ }
+ }
+
private async Task DequeueCoinsFromMixNoLockAsync(params (uint256 txid, uint index)[] coins)
{
List<Exception> exceptions = new List<Exception>();

Implement dequeue all coins