Timeout if coins sum == 0
MODIFY
WalletWasabi.Tests/RegTests.cs
WalletWasabi.Tests/RegTests.cs
@@ -683,6 +683,17 @@ namespace WalletWasabi.Tests
await wallet.InitializeAsync(cts.Token); // Initialize wallet service.
}
+ var waitCount = 0;
+ while(wallet.Coins.Sum(x => x.Amount) == Money.Zero)
+ {
+ await Task.Delay(1000);
+ waitCount++;
+ if(waitCount >= 21)
+ {
+ throw new TimeoutException("Funding transaction to the wallet did not arrive.");
+ }
+ }
+
var scp = new Key().ScriptPubKey;
var res2 = await wallet.BuildTransactionAsync("password", new[] { new WalletService.Operation(scp, new Money(0.05m, MoneyUnit.BTC), "foo") }, 5, false);

Timeout if coins sum == 0