`Key` doesn't contain a `ScriptPubKey` anymore
MODIFY
WalletWasabi.Tests/RegressionTests/BuildTests.cs
WalletWasabi.Tests/RegressionTests/BuildTests.cs
@@ -70,7 +70,7 @@ namespace WalletWasabi.Tests.RegressionTests
using var wallet = Wallet.CreateAndRegisterServices(network, bitcoinStore, keyManager, synchronizer, workDir, serviceConfiguration, feeProvider, blockProvider);
wallet.NewFilterProcessed += Common.Wallet_NewFilterProcessed;
- var scp = new Key().ScriptPubKey;
+ var scp = new Key().PubKey.ScriptPubKey;
PaymentIntent validIntent = new(scp, Money.Coins(1));
PaymentIntent invalidIntent = new(new DestinationRequest(scp, Money.Coins(10 * 1000 * 1000)), new DestinationRequest(scp, Money.Coins(12 * 1000 * 1000)));
@@ -226,7 +226,7 @@ namespace WalletWasabi.Tests.RegressionTests
// Generate script
using var k = new Key();
- var scp = k.ScriptPubKey;
+ var scp = k.PubKey.ScriptPubKey;
// Get some money, make it confirm.
var key = keyManager.GetNextReceiveKey("foo label", out _);

MODIFY
WalletWasabi.Tests/RegressionTests/CoinJoinTests.cs
WalletWasabi.Tests/RegressionTests/CoinJoinTests.cs
@@ -300,7 +300,7 @@ namespace WalletWasabi.Tests.RegressionTests
round = coordinator.GetCurrentInputRegisterableRoundOrDefault();
requester = new Requester();
nonce = round.NonceProvider.GetNextNonce();
- blindedData = new BlindedOutputWithNonceIndex(nonce.N, requester.BlindScript(round.MixingLevels.GetBaseLevel().SignerKey.PubKey, nonce.R, key.ScriptPubKey));
+ blindedData = new BlindedOutputWithNonceIndex(nonce.N, requester.BlindScript(round.MixingLevels.GetBaseLevel().SignerKey.PubKey, nonce.R, key.PubKey.ScriptPubKey));
inputsRequest.BlindedOutputScripts = new[] { blindedData };
blindedOutputScriptsHash = new uint256(NBitcoin.Crypto.Hashes.SHA256(blindedData.BlindedOutput.ToBytes()));
proof = key.SignCompact(blindedOutputScriptsHash);
@@ -345,7 +345,7 @@ namespace WalletWasabi.Tests.RegressionTests
Assert.Equal($"{HttpStatusCode.BadRequest.ToReasonString()}\nCannot register an input twice.", httpRequestException.Message);
nonce = round.NonceProvider.GetNextNonce();
- blindedData = new BlindedOutputWithNonceIndex(nonce.N, requester.BlindScript(round.MixingLevels.GetBaseLevel().SignerKey.PubKey, nonce.R, key.ScriptPubKey));
+ blindedData = new BlindedOutputWithNonceIndex(nonce.N, requester.BlindScript(round.MixingLevels.GetBaseLevel().SignerKey.PubKey, nonce.R, key.PubKey.ScriptPubKey));
inputsRequest.BlindedOutputScripts = new[] { blindedData };
blindedOutputScriptsHash = new uint256(NBitcoin.Crypto.Hashes.SHA256(blindedData.BlindedOutput.ToBytes()));
@@ -890,7 +890,7 @@ namespace WalletWasabi.Tests.RegressionTests
{
receiveSatoshi = 100000000;
}
- BitcoinWitPubKeyAddress inputAddress = key.PubKey.GetAddress(ScriptPubKeyType.Segwit, network);
+ var inputAddress = key.PubKey.GetAddress(ScriptPubKeyType.Segwit, network);
uint256 txHash = await rpc.SendToAddressAsync(inputAddress, Money.Satoshis(receiveSatoshi));
fundingTxCount++;
Assert.NotNull(txHash);

MODIFY
WalletWasabi.Tests/RegressionTests/SendTests.cs
WalletWasabi.Tests/RegressionTests/SendTests.cs
@@ -106,7 +106,7 @@ namespace WalletWasabi.Tests.RegressionTests
}
}
- var scp = new Key().ScriptPubKey;
+ var scp = new Key().PubKey.ScriptPubKey;
var res2 = wallet.BuildTransaction(password, new PaymentIntent(scp, Money.Coins(0.05m), label: "foo"), FeeStrategy.CreateFromConfirmationTarget(5), allowUnconfirmed: false);
Assert.NotNull(res2.Transaction);
@@ -470,8 +470,8 @@ namespace WalletWasabi.Tests.RegressionTests
new DestinationRequest(k2, Money.Coins(0.0003m), label: "outgoing")),
FeeStrategy.TwentyMinutesConfirmationTargetStrategy);
- Assert.Contains(k1.ScriptPubKey, res.OuterWalletOutputs.Select(x => x.ScriptPubKey));
- Assert.Contains(k2.ScriptPubKey, res.OuterWalletOutputs.Select(x => x.ScriptPubKey));
+ Assert.Contains(k1.PubKey.ScriptPubKey, res.OuterWalletOutputs.Select(x => x.ScriptPubKey));
+ Assert.Contains(k2.PubKey.ScriptPubKey, res.OuterWalletOutputs.Select(x => x.ScriptPubKey));
#endregion CustomChange
@@ -579,7 +579,7 @@ namespace WalletWasabi.Tests.RegressionTests
TransactionBroadcaster broadcaster = new(network, bitcoinStore, httpClientFactory, walletManager);
broadcaster.Initialize(nodes, rpc);
- PaymentIntent operations = new(new DestinationRequest(key.P2wpkhScript, Money.Coins(0.01m)), new DestinationRequest(new Key().ScriptPubKey, Money.Coins(0.01m)), new DestinationRequest(new Key().ScriptPubKey, Money.Coins(0.01m)));
+ PaymentIntent operations = new(new DestinationRequest(key.P2wpkhScript, Money.Coins(0.01m)), new DestinationRequest(new Key().PubKey.ScriptPubKey, Money.Coins(0.01m)), new DestinationRequest(new Key().PubKey.ScriptPubKey, Money.Coins(0.01m)));
var tx1Res = wallet.BuildTransaction(password, operations, FeeStrategy.TwentyMinutesConfirmationTargetStrategy, allowUnconfirmed: true);
Assert.Equal(2, tx1Res.InnerWalletOutputs.Count());
Assert.Equal(2, tx1Res.OuterWalletOutputs.Count());

MODIFY
WalletWasabi.Tests/UnitTests/BlockNotifierTests.cs
WalletWasabi.Tests/UnitTests/BlockNotifierTests.cs
@@ -264,7 +264,12 @@ namespace WalletWasabi.Tests.UnitTests
{
var rpc = new MockRpcClient();
rpc.OnGetBestBlockHashAsync = () => Task.FromResult(chain.Tip.HashBlock);
- rpc.OnGetBlockAsync = (blockHash) => Task.FromResult(Block.CreateBlock(chain.GetBlock(blockHash).Header, rpc.Network));
+ rpc.OnGetBlockAsync = (blockHash) => {
+ var block = rpc.Network.Consensus.ConsensusFactory.CreateBlock();
+ block.Header = chain.GetBlock(blockHash).Header;
+ return Task.FromResult(block);
+ };
+
rpc.OnGetBlockHeaderAsync = (blockHash) => Task.FromResult(chain.GetBlock(blockHash).Header);
var notifier = new BlockNotifier(TimeSpan.FromMilliseconds(100), rpc);

MODIFY
WalletWasabi.Tests/UnitTests/CoordinatorRoundTests.cs
WalletWasabi.Tests/UnitTests/CoordinatorRoundTests.cs
@@ -36,7 +36,7 @@ namespace WalletWasabi.Tests.UnitTests
tx.Inputs.Add(GetRandomOutPoint(), new Script(OpcodeType.OP_0, OpcodeType.OP_0), sequence: Sequence.Final);
tx.Inputs.Add(GetRandomOutPoint(), new Script(OpcodeType.OP_0, OpcodeType.OP_0), sequence: Sequence.Final);
using var key = new Key();
- tx.Outputs.Add(Money.Coins(1.9995m), key.ScriptPubKey);
+ tx.Outputs.Add(Money.Coins(1.9995m), key.PubKey.ScriptPubKey);
// Under normal circunstances
{
@@ -46,7 +46,7 @@ namespace WalletWasabi.Tests.UnitTests
});
var tx0 = tx.Clone();
- var spentCoins = tx0.Inputs.Select(x => new Coin(x.PrevOut, new TxOut(Money.Coins(1), new Key().ScriptPubKey)));
+ var spentCoins = tx0.Inputs.Select(x => new Coin(x.PrevOut, new TxOut(Money.Coins(1), new Key().PubKey.ScriptPubKey)));
var txFeeBeforeOptimization = tx0.GetFee(spentCoins.ToArray());
await round.TryOptimizeFeesAsync(tx0, spentCoins);
var txFeeAfterOptimization = tx0.GetFee(spentCoins.ToArray());
@@ -61,7 +61,7 @@ namespace WalletWasabi.Tests.UnitTests
});
var tx1 = tx.Clone();
- var spentCoins = tx1.Inputs.Select(x => new Coin(x.PrevOut, new TxOut(Money.Coins(1), new Key().ScriptPubKey)));
+ var spentCoins = tx1.Inputs.Select(x => new Coin(x.PrevOut, new TxOut(Money.Coins(1), new Key().PubKey.ScriptPubKey)));
var txFeeBeforeOptimization = tx1.GetFee(spentCoins.ToArray());
await round.TryOptimizeFeesAsync(tx1, spentCoins);
var txFeeAfterOptimization = tx1.GetFee(spentCoins.ToArray());

MODIFY
WalletWasabi.Tests/UnitTests/SmartBlockProviderTests.cs
WalletWasabi.Tests/UnitTests/SmartBlockProviderTests.cs
@@ -18,8 +18,8 @@ namespace WalletWasabi.Tests.UnitTests
{
var blocks = new Dictionary<uint256, Block>
{
- [uint256.Zero] = Block.CreateBlock(Network.Main),
- [uint256.One] = Block.CreateBlock(Network.Main)
+ [uint256.Zero] = Network.Main.Consensus.ConsensusFactory.CreateBlock(),
+ [uint256.One] = Network.Main.Consensus.ConsensusFactory.CreateBlock(),
};
var blockProvider = new TestBlockProvider(blocks);

MODIFY
WalletWasabi.Tests/UnitTests/Transactions/PayjoinTests.cs
WalletWasabi.Tests/UnitTests/Transactions/PayjoinTests.cs
@@ -93,7 +93,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var amount = Money.Coins(0.001m);
using Key key = new();
- PaymentIntent payment = new(key.ScriptPubKey, amount);
+ PaymentIntent payment = new(key.PubKey.ScriptPubKey, amount);
var tx = transactionFactory.BuildTransaction(payment, new FeeRate(2m), allowedCoins.Select(x => x.OutPoint), payjoinClient);

MODIFY
WalletWasabi.Tests/UnitTests/Transactions/TransactionFactoryTests.cs
WalletWasabi.Tests/UnitTests/Transactions/TransactionFactoryTests.cs
@@ -29,7 +29,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// We try to spend 100btc but we only have 0.03
var amount = Money.Coins(100m);
using Key key = new();
- var payment = new PaymentIntent(key.ScriptPubKey, amount);
+ var payment = new PaymentIntent(key, amount);
var ex = Assert.Throws<InsufficientBalanceException>(() => transactionFactory.BuildTransaction(payment, new FeeRate(2m)));
@@ -46,7 +46,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
});
using Key key = new();
- var payment = new PaymentIntent(key.ScriptPubKey, MoneyRequest.CreateAllRemaining(subtractFee: true));
+ var payment = new PaymentIntent(key, MoneyRequest.CreateAllRemaining(subtractFee: true));
var result = transactionFactory.BuildTransaction(payment, new FeeRate(44.25m));
var output = Assert.Single(result.OuterWalletOutputs);
@@ -68,7 +68,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// There is a 0.08 coin with AS=50. However it selects the most private one with AS= 200
using Key key = new();
- var destination = key.ScriptPubKey;
+ var destination = key;
var payment = new PaymentIntent(destination, Money.Coins(0.07m), label: "Sophie");
var feeRate = new FeeRate(2m);
var result = transactionFactory.BuildTransaction(payment, feeRate);
@@ -97,7 +97,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// There is a 0.8 coin with AS=50. However it selects the most private one with AS= 200
using Key key = new();
- var payment = new PaymentIntent(key.ScriptPubKey, Money.Coins(0.07m), label: "Sophie");
+ var payment = new PaymentIntent(key, Money.Coins(0.07m), label: "Sophie");
var feeRate = new FeeRate(2m);
var result = transactionFactory.BuildTransaction(payment, feeRate);
@@ -128,7 +128,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// It has to select the most private coins regardless of the amounts
using Key key = new();
- var payment = new PaymentIntent(key.ScriptPubKey, Money.Coins(0.17m));
+ var payment = new PaymentIntent(key, Money.Coins(0.17m));
var feeRate = new FeeRate(2m);
var result = transactionFactory.BuildTransaction(payment, feeRate);
@@ -159,7 +159,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// Selecting 0.08 + 0.04 should be enough but it has to select 0.02 too because it is the same address
using Key key = new();
- var payment = new PaymentIntent(key.ScriptPubKey, Money.Coins(0.1m), label: "Sophie");
+ var payment = new PaymentIntent(key, Money.Coins(0.1m), label: "Sophie");
var feeRate = new FeeRate(2m);
var result = transactionFactory.BuildTransaction(payment, feeRate);
@@ -224,7 +224,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// Two 0.9btc coins are enough
using Key key1 = new();
- var payment = new PaymentIntent(key1.ScriptPubKey, Money.Coins(1.75m), label: "Sophie");
+ var payment = new PaymentIntent(key1, Money.Coins(1.75m), label: "Sophie");
var feeRate = new FeeRate(2m);
var result = transactionFactory.BuildTransaction(payment, feeRate);
@@ -235,7 +235,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// Three 0.9btc coins are enough
using Key key2 = new();
- payment = new PaymentIntent(key2.ScriptPubKey, Money.Coins(1.85m), label: "Sophie");
+ payment = new PaymentIntent(key2, Money.Coins(1.85m), label: "Sophie");
feeRate = new FeeRate(2m);
result = transactionFactory.BuildTransaction(payment, feeRate);
@@ -248,7 +248,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// Four 0.9btc coins are enough but this time the more private cluster is NOT enough
// That's why it has to use the coins in the cluster number 1
using Key key3 = new();
- payment = new PaymentIntent(key3.ScriptPubKey, Money.Coins(3.5m), label: "Sophie");
+ payment = new PaymentIntent(key3, Money.Coins(3.5m), label: "Sophie");
feeRate = new FeeRate(2m);
result = transactionFactory.BuildTransaction(payment, feeRate);
@@ -262,7 +262,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// Nine 0.9btc coins are enough but there is no cluster big enough
// That's why it has to use the coins from both the clusters
using Key key = new();
- payment = new PaymentIntent(key.ScriptPubKey, Money.Coins(7.4m), label: "Sophie");
+ payment = new PaymentIntent(key, Money.Coins(7.4m), label: "Sophie");
feeRate = new FeeRate(2m);
result = transactionFactory.BuildTransaction(payment, feeRate);
@@ -282,8 +282,8 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var payment = new PaymentIntent(new[]
{
- new DestinationRequest(key.ScriptPubKey, Money.Coins(0.1m)),
- new DestinationRequest(changeKey.ScriptPubKey, MoneyRequest.CreateChange(subtractFee: true))
+ new DestinationRequest(key.PubKey, Money.Coins(0.1m)),
+ new DestinationRequest(changeKey.PubKey, MoneyRequest.CreateChange(subtractFee: true))
});
var feeRate = new FeeRate(2m);
var result = transactionFactory.BuildTransaction(payment, feeRate);
@@ -295,7 +295,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var tx = result.Transaction.Transaction;
Assert.Equal(2, tx.Outputs.Count);
- var changeOutput = Assert.Single<TxOut>(tx.Outputs, x => x.ScriptPubKey == changeKey.ScriptPubKey);
+ var changeOutput = Assert.Single<TxOut>(tx.Outputs, x => x.ScriptPubKey == changeKey.PubKey.ScriptPubKey);
Assert.False(transactionFactory.KeyManager.TryGetKeyForScriptPubKey(changeOutput.ScriptPubKey, out _));
Assert.Equal(Money.Coins(0.9m), changeOutput.Value + result.Fee);
}
@@ -314,9 +314,9 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var payment = new PaymentIntent(new[]
{
- new DestinationRequest(key1.ScriptPubKey, Money.Coins(0.3m)),
- new DestinationRequest(key2.ScriptPubKey, Money.Coins(0.3m), subtractFee: true),
- new DestinationRequest(key3.ScriptPubKey, Money.Coins(0.3m))
+ new DestinationRequest(key1, Money.Coins(0.3m)),
+ new DestinationRequest(key2, Money.Coins(0.3m), subtractFee: true),
+ new DestinationRequest(key3, Money.Coins(0.3m))
});
var feeRate = new FeeRate(2m);
var result = transactionFactory.BuildTransaction(payment, feeRate);
@@ -328,7 +328,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var tx = result.Transaction.Transaction;
Assert.Equal(4, tx.Outputs.Count);
- var destination2Output = Assert.Single<TxOut>(tx.Outputs, x => x.ScriptPubKey == key2.ScriptPubKey);
+ var destination2Output = Assert.Single<TxOut>(tx.Outputs, x => x.ScriptPubKey == key2.GetScriptPubKey(ScriptPubKeyType.Legacy));
Assert.Equal(Money.Coins(0.3m), destination2Output.Value + result.Fee);
var changeOutput = Assert.Single(tx.Outputs, x => transactionFactory.KeyManager.TryGetKeyForScriptPubKey(x.ScriptPubKey, out _));
@@ -349,9 +349,9 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var payment = new PaymentIntent(new[]
{
- new DestinationRequest(key1.ScriptPubKey, Money.Coins(0.3m)),
- new DestinationRequest(key2.ScriptPubKey, Money.Coins(0.00001m), subtractFee: true),
- new DestinationRequest(key3.ScriptPubKey, Money.Coins(0.3m))
+ new DestinationRequest(key1, Money.Coins(0.3m)),
+ new DestinationRequest(key2, Money.Coins(0.00001m), subtractFee: true),
+ new DestinationRequest(key3, Money.Coins(0.3m))
});
var feeRate = new FeeRate(20m);
var ex = Assert.Throws<NotEnoughFundsException>(() => transactionFactory.BuildTransaction(payment, feeRate));
@@ -368,7 +368,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
});
using Key key = new();
- var destination = key.ScriptPubKey;
+ var destination = key.PubKey;
var payment = new PaymentIntent(new[]
{
new DestinationRequest(destination, Money.Coins(0.3m)),
@@ -386,7 +386,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
Assert.Equal(2, tx.Outputs.Count); // consolidates same address payment
var destinationOutput = Assert.Single(result.OuterWalletOutputs);
- Assert.Equal(destination, destinationOutput.ScriptPubKey);
+ Assert.Equal(destination.ScriptPubKey, destinationOutput.ScriptPubKey);
Assert.Equal(Money.Coins(0.9m), destinationOutput.Amount + result.Fee);
var changeOutput = Assert.Single(result.InnerWalletOutputs);
@@ -405,7 +405,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
});
using Key key = new();
- var destination = key.ScriptPubKey;
+ var destination = key;
var payment = new PaymentIntent(new[]
{
new DestinationRequest(destination, MoneyRequest.CreateAllRemaining(subtractFee: true))
@@ -432,7 +432,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
});
using Key key = new();
- var payment = new PaymentIntent(key.ScriptPubKey, Money.Coins(0.095m));
+ var payment = new PaymentIntent(key, Money.Coins(0.095m));
var feeRate = new FeeRate(2m);
var coins = transactionFactory.Coins;
var allowedCoins = new[]
@@ -461,7 +461,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
});
using Key key = new();
- var destination = key.ScriptPubKey;
+ var destination = key.PubKey;
var payment = new PaymentIntent(destination, MoneyRequest.CreateAllRemaining(subtractFee: true));
var feeRate = new FeeRate(2m);
var coins = transactionFactory.Coins;
@@ -482,7 +482,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var tx = result.Transaction.Transaction;
Assert.Single(tx.Outputs);
- var destinationutput = Assert.Single(tx.Outputs, x => x.ScriptPubKey == destination);
+ var destinationutput = Assert.Single(tx.Outputs, x => x.ScriptPubKey == destination.ScriptPubKey);
Assert.Equal(Money.Coins(0.13m), destinationutput.Value + result.Fee);
}
@@ -502,7 +502,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var amount = Money.Coins(0.5m); // it is not enough
using Key key = new();
- var payment = new PaymentIntent(key.ScriptPubKey, amount);
+ var payment = new PaymentIntent(key, amount);
var ex = Assert.Throws<InsufficientBalanceException>(() =>
transactionFactory.BuildTransaction(payment, new FeeRate(2m), allowedCoins.Select(x => x.OutPoint)));
@@ -524,7 +524,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// Selecting 0.08 + 0.02 should be enough but it has to select 0.02 too because it is the same address
using Key key = new();
- var payment = new PaymentIntent(key.ScriptPubKey, Money.Coins(0.095m));
+ var payment = new PaymentIntent(key, Money.Coins(0.095m));
var feeRate = new FeeRate(2m);
var coins = transactionFactory.Coins;
@@ -556,7 +556,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
watchOnly: true);
using Key key = new();
- var payment = new PaymentIntent(key.ScriptPubKey, MoneyRequest.CreateAllRemaining(subtractFee: true));
+ var payment = new PaymentIntent(key, MoneyRequest.CreateAllRemaining(subtractFee: true));
var result = transactionFactory.BuildTransaction(payment, new FeeRate(44.25m));
Assert.Single(result.OuterWalletOutputs);

MODIFY
WalletWasabi.Tests/UnitTests/Transactions/TransactionProcessorTests.cs
WalletWasabi.Tests/UnitTests/Transactions/TransactionProcessorTests.cs
@@ -949,7 +949,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
// Spend the received coin to someone else B
var changeScript1 = transactionProcessor.NewKey("B").P2wpkhScript;
using Key key = new();
- var tx1 = CreateSpendingTransaction(new[] { createdCoin.Coin }, key.ScriptPubKey, changeScript1);
+ var tx1 = CreateSpendingTransaction(new[] { createdCoin.Coin }, key.PubKey.ScriptPubKey, changeScript1);
transactionProcessor.Process(tx1);
createdCoin = transactionProcessor.Coins.First();
Assert.Equal("A, B", createdCoin.HdPubKey.Cluster.Labels);
@@ -1002,7 +1002,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var changeScript = transactionProcessor.NewKey("D").P2wpkhScript;
var coins = new[] { scoinA.Coin, scoinB.Coin, scoinC.Coin };
using Key key1 = new();
- var tx3 = CreateSpendingTransaction(coins, key1.ScriptPubKey, changeScript);
+ var tx3 = CreateSpendingTransaction(coins, key1.PubKey.ScriptPubKey, changeScript);
transactionProcessor.Process(tx3);
var changeCoinD = Assert.Single(transactionProcessor.Coins);
@@ -1016,7 +1016,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
changeScript = transactionProcessor.NewKey("F").P2wpkhScript;
coins = new[] { changeCoinD.Coin, scoinE.Coin };
using Key key2 = new();
- var tx5 = CreateSpendingTransaction(coins, key2.ScriptPubKey, changeScript);
+ var tx5 = CreateSpendingTransaction(coins, key2.PubKey.ScriptPubKey, changeScript);
transactionProcessor.Process(tx5);
var changeCoin = Assert.Single(transactionProcessor.Coins);
@@ -1224,7 +1224,7 @@ namespace WalletWasabi.Tests.UnitTests.Transactions
var changeScript = transactionProcessor.NewKey("D").P2wpkhScript;
var coins = new[] { scoinA.Coin, scoinB.Coin, scoinC.Coin };
using Key key = new();
- var tx3 = CreateSpendingTransaction(coins, key.ScriptPubKey, changeScript, height: 55555);
+ var tx3 = CreateSpendingTransaction(coins, key.PubKey.ScriptPubKey, changeScript, height: 55555);
transactionProcessor.Process(tx3);
var changeCoinD = Assert.Single(transactionProcessor.Coins);

MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterInputFailureTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/PostRequests/RegisterInputFailureTests.cs
@@ -270,7 +270,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Backend.PostRequests
.ReturnsAsync(new NBitcoin.RPC.GetTxOutResponse
{
Confirmations = 1,
- TxOut = new(Money.Coins(1), key.PubKey.GetScriptAddress(Network.Main))
+ TxOut = new(Money.Coins(1), key.PubKey.ScriptPubKey.Hash.GetAddress(Network.Main))
});
using Arena arena = await WabiSabiFactory.CreateAndStartArenaAsync(cfg, mockRpc, round);

`Key` doesn't contain a `ScriptPubKey` anymore