create interface and empty txn store
MODIFY
WalletWasabi.Fluent/Helpers/TransactionHelpers.cs
WalletWasabi.Fluent/Helpers/TransactionHelpers.cs
@@ -112,10 +112,7 @@ public static class TransactionHelpers
subtractFee: transactionInfo.SubtractFee,
label: transactionInfo.UserLabels);
- var network = keyManager.GetNetwork();
- string dataDir = EnvironmentHelpers.GetDataDir(Path.Combine("WalletWasabi", "DummyDirectory"));
- var emptyTransactionStore = new AllTransactionStore(dataDir, network);
- var builder = new TransactionFactory(network, keyManager, allCoins, emptyTransactionStore, password, true);
+ var builder = new TransactionFactory(keyManager.GetNetwork(), keyManager, allCoins, new EmptyTransactionStore(), password, true);
builder.BuildTransaction(
intent,

MODIFY
WalletWasabi/Blockchain/Transactions/AllTransactionStore.cs
WalletWasabi/Blockchain/Transactions/AllTransactionStore.cs
@@ -14,7 +14,7 @@ using WalletWasabi.Logging;
namespace WalletWasabi.Blockchain.Transactions;
-public class AllTransactionStore : IAsyncDisposable
+public class AllTransactionStore : ITransactionStore, IAsyncDisposable
{
public AllTransactionStore(string workFolderPath, Network network)
{

MODIFY
WalletWasabi/Blockchain/Transactions/TransactionFactory.cs
WalletWasabi/Blockchain/Transactions/TransactionFactory.cs
@@ -20,7 +20,7 @@ namespace WalletWasabi.Blockchain.Transactions;
public class TransactionFactory
{
/// <param name="allowUnconfirmed">Allow to spend unconfirmed transactions, if necessary.</param>
- public TransactionFactory(Network network, KeyManager keyManager, ICoinsView coins, AllTransactionStore transactionStore, string password = "", bool allowUnconfirmed = false)
+ public TransactionFactory(Network network, KeyManager keyManager, ICoinsView coins, ITransactionStore transactionStore, string password = "", bool allowUnconfirmed = false)
{
Network = network;
KeyManager = keyManager;
@@ -35,7 +35,7 @@ public class TransactionFactory
public ICoinsView Coins { get; }
public string Password { get; }
public bool AllowUnconfirmed { get; }
- private AllTransactionStore TransactionStore { get; }
+ private ITransactionStore TransactionStore { get; }
/// <inheritdoc cref="BuildTransaction(PaymentIntent, Func{FeeRate}, IEnumerable{OutPoint}?, Func{LockTime}?, IPayjoinClient?, bool)"/>
public BuildTransactionResult BuildTransaction(

MODIFY
WalletWasabi/Extensions/NBitcoinExtensions.cs
WalletWasabi/Extensions/NBitcoinExtensions.cs
@@ -430,7 +430,7 @@ public static class NBitcoinExtensions
/// <summary>
/// Tries to equip the PSBT with previous transactions with best effort. Always <see cref="AddKeyPaths"/> first otherwise the prev tx won't be added.
/// </summary>
- public static void AddPrevTxs(this PSBT psbt, AllTransactionStore transactionStore)
+ public static void AddPrevTxs(this PSBT psbt, ITransactionStore transactionStore)
{
// Fill out previous transactions.
foreach (var psbtInput in psbt.Inputs)

create interface and empty txn store