Use interface where can (fixed test)
MODIFY
WalletWasabi.Tests/Helpers/ArenaBuilder.cs
WalletWasabi.Tests/Helpers/ArenaBuilder.cs
@@ -22,7 +22,7 @@ public class ArenaBuilder
public WabiSabiConfig? Config { get; set; }
public IRPCClient? Rpc { get; set; }
public Prison? Prison { get; set; }
- public CoinJoinIdStore? CoinJoinIdStore { get; set; }
+ public ICoinJoinIdStore? CoinJoinIdStore { get; set; }
/// <param name="rounds">Rounds to initialize <see cref="Arena"/> with.</param>
public Arena Create(params Round[] rounds)
@@ -32,7 +32,7 @@ public class ArenaBuilder
WabiSabiConfig config = Config ?? new();
IRPCClient rpc = Rpc ?? WabiSabiFactory.CreatePreconfiguredRpcClient().Object;
Network network = Network ?? Network.Main;
- CoinJoinIdStore coinJoinIdStore = CoinJoinIdStore ?? new();
+ ICoinJoinIdStore coinJoinIdStore = CoinJoinIdStore ?? new CoinJoinIdStore();
Arena arena = new(period, network, config, rpc, prison, coinJoinIdStore);
@@ -65,7 +65,7 @@ public class ArenaBuilder
}
}
- public ArenaBuilder With(CoinJoinIdStore store)
+ public ArenaBuilder With(ICoinJoinIdStore store)
{
CoinJoinIdStore = store;
return this;

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/WabiSabiApiApplicationFactory.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/WabiSabiApiApplicationFactory.cs
@@ -58,7 +58,7 @@ public class WabiSabiApiApplicationFactory<TStartup> : WebApplicationFactory<TSt
services.AddScoped<Prison>();
services.AddScoped<WabiSabiConfig>();
services.AddScoped(typeof(TimeSpan), _ => TimeSpan.FromSeconds(2));
- services.AddScoped(s => new CoinJoinIdStore());
+ services.AddScoped<ICoinJoinIdStore>(s => new CoinJoinIdStore());
services.AddSingleton<CoinJoinFeeRateStatStore>();
});
builder.ConfigureLogging(o =>

MODIFY
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
WalletWasabi/WabiSabi/Backend/Rounds/Arena.cs
@@ -25,7 +25,7 @@ public partial class Arena : PeriodicRunner
WabiSabiConfig config,
IRPCClient rpc,
Prison prison,
- CoinJoinIdStore coinJoinIdStore,
+ ICoinJoinIdStore coinJoinIdStore,
CoinJoinTransactionArchiver? archiver = null,
CoinJoinScriptStore? coinJoinScriptStore = null) : base(period)
{
@@ -48,7 +48,7 @@ public partial class Arena : PeriodicRunner
private SecureRandom Random { get; }
private CoinJoinTransactionArchiver? TransactionArchiver { get; }
public CoinJoinScriptStore? CoinJoinScriptStore { get; }
- public CoinJoinIdStore CoinJoinIdStore { get; private set; }
+ public ICoinJoinIdStore CoinJoinIdStore { get; private set; }
public event EventHandler<Transaction>? CoinJoinBroadcast;

MODIFY
WalletWasabi/WabiSabi/WabiSabiCoordinator.cs
WalletWasabi/WabiSabi/WabiSabiCoordinator.cs
@@ -17,7 +17,7 @@ namespace WalletWasabi.WabiSabi;
public class WabiSabiCoordinator : BackgroundService
{
- public WabiSabiCoordinator(CoordinatorParameters parameters, IRPCClient rpc, CoinJoinIdStore coinJoinIdStore)
+ public WabiSabiCoordinator(CoordinatorParameters parameters, IRPCClient rpc, ICoinJoinIdStore coinJoinIdStore)
{
Parameters = parameters;

Use interface where can (fixed test)