Remove hack, update NBitcoin
MODIFY
WalletWasabi.Gui/packages.lock.json
WalletWasabi.Gui/packages.lock.json
},
"NBitcoin": {
"type": "Transitive",
- "resolved": "5.0.57",
- "contentHash": "KPSXwlUAcsysp27ygpO/dQDqu1R2kKUDfloDovTRwajFIpKJ/QY6vWrhR0d4IDMh9A3HBCiN3yc6oFUpYj/NYw==",
+ "resolved": "5.0.60",
+ "contentHash": "kLXU2J7KRpI5aOAtfiVRJQJhFBMhQQDauuEFvE/JHgCzx0K+54Tmy05bW54G7HMSEaWNUzbknZxWjg6PW5CdUQ==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "1.0.0",
"Newtonsoft.Json": "11.0.1"
"dependencies": {
"Microsoft.AspNetCore.Mvc.NewtonsoftJson": "3.1.1",
"Microsoft.Win32.Registry": "4.7.0",
- "NBitcoin": "5.0.57",
+ "NBitcoin": "5.0.60",
"NBitcoin.Secp256k1": "1.0.8"
}
}

MODIFY
WalletWasabi.Packager/packages.lock.json
WalletWasabi.Packager/packages.lock.json
},
"NBitcoin": {
"type": "Transitive",
- "resolved": "5.0.57",
- "contentHash": "KPSXwlUAcsysp27ygpO/dQDqu1R2kKUDfloDovTRwajFIpKJ/QY6vWrhR0d4IDMh9A3HBCiN3yc6oFUpYj/NYw==",
+ "resolved": "5.0.60",
+ "contentHash": "kLXU2J7KRpI5aOAtfiVRJQJhFBMhQQDauuEFvE/JHgCzx0K+54Tmy05bW54G7HMSEaWNUzbknZxWjg6PW5CdUQ==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "1.0.0",
"Newtonsoft.Json": "11.0.1"
"dependencies": {
"Microsoft.AspNetCore.Mvc.NewtonsoftJson": "3.1.1",
"Microsoft.Win32.Registry": "4.7.0",
- "NBitcoin": "5.0.57",
+ "NBitcoin": "5.0.60",
"NBitcoin.Secp256k1": "1.0.8"
}
}

MODIFY
WalletWasabi/Blockchain/Transactions/TransactionFactory.cs
WalletWasabi/Blockchain/Transactions/TransactionFactory.cs
@@ -218,12 +218,13 @@ namespace WalletWasabi.Blockchain.Transactions
Logger.LogInfo("Signing transaction...");
// It must be watch only, too, because if we have the key and also hardware wallet, we do not care we can sign.
+ psbt.AddPrevTxs(TransactionStore);
+ psbt.AddKeyPaths(KeyManager);
+
Transaction tx;
if (KeyManager.IsWatchOnly)
{
tx = psbt.GetGlobalTransaction();
- psbt.AddPrevTxs(TransactionStore);
- psbt.AddKeyPaths(KeyManager);
}
else
{
@@ -235,14 +236,12 @@ namespace WalletWasabi.Blockchain.Transactions
// Try to pay using payjoin
if (payjoinClient is { })
{
- psbt.AddPrevTxs(TransactionStore);
- psbt.AddKeyPaths(KeyManager); // The negotiation strips it so no privacy leak, but for some reason it still needs it.
psbt = TryNegotiatePayjoin(payjoinClient, builder, psbt, changeHdPubKey);
isPayjoin = true;
- }
-
psbt.AddPrevTxs(TransactionStore);
psbt.AddKeyPaths(KeyManager);
+ }
+
psbt.Finalize();
tx = psbt.ExtractTransaction();

MODIFY
WalletWasabi/Extensions/NBitcoinExtensions.cs
WalletWasabi/Extensions/NBitcoinExtensions.cs
@@ -425,12 +425,6 @@ namespace NBitcoin
}
}
- // Hack around NBitcoin bug: https://github.com/zkSNACKs/WalletWasabi/issues/4460
- foreach (var o in psbt.Outputs)
- {
- o.HDKeyPaths.Clear();
- }
-
// Add output keypaths.
foreach (var script in psbt.Outputs.Select(x => x.ScriptPubKey).ToArray())
{

MODIFY
WalletWasabi/WalletWasabi.csproj
WalletWasabi/WalletWasabi.csproj
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.1" />
- <PackageReference Include="NBitcoin" Version="5.0.57" />
+ <PackageReference Include="NBitcoin" Version="5.0.60" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="NBitcoin.Secp256k1" Version="1.0.8" />
</ItemGroup>

MODIFY
WalletWasabi/packages.lock.json
WalletWasabi/packages.lock.json
},
"NBitcoin": {
"type": "Direct",
- "requested": "[5.0.57, )",
- "resolved": "5.0.57",
- "contentHash": "KPSXwlUAcsysp27ygpO/dQDqu1R2kKUDfloDovTRwajFIpKJ/QY6vWrhR0d4IDMh9A3HBCiN3yc6oFUpYj/NYw==",
+ "requested": "[5.0.60, )",
+ "resolved": "5.0.60",
+ "contentHash": "kLXU2J7KRpI5aOAtfiVRJQJhFBMhQQDauuEFvE/JHgCzx0K+54Tmy05bW54G7HMSEaWNUzbknZxWjg6PW5CdUQ==",
"dependencies": {
"Microsoft.Extensions.Logging.Abstractions": "1.0.0",
"Newtonsoft.Json": "11.0.1"

Remove hack, update NBitcoin