Do not dismiss payjoin fee checks
MODIFY
WalletWasabi/Blockchain/Transactions/TransactionFactory.cs
WalletWasabi/Blockchain/Transactions/TransactionFactory.cs
@@ -231,12 +231,14 @@ namespace WalletWasabi.Blockchain.Transactions
UpdatePSBTInfo(psbt, spentCoins, changeHdPubKey);
+ var isPayjoin = false;
if (!KeyManager.IsWatchOnly)
{
// Try to pay using payjoin
if (payjoinClient is { })
{
psbt = TryNegotiatePayjoin(payjoinClient, builder, psbt, changeHdPubKey);
+ isPayjoin = true;
}
}
psbt.Finalize();
@@ -248,6 +250,8 @@ namespace WalletWasabi.Blockchain.Transactions
throw new InvalidOperationException("Impossible to get the fee rate of the PSBT, this should never happen.");
}
+ if (!isPayjoin)
+ {
// Manually check the feerate, because some inaccuracy is possible.
var sb1 = feeRate.SatoshiPerByte;
var sb2 = actualFeeRate.SatoshiPerByte;
@@ -256,6 +260,7 @@ namespace WalletWasabi.Blockchain.Transactions
// So it'll generate a transactionpolicy error thrown below.
checkResults.Add(new NotEnoughFundsPolicyError("Fees different than expected"));
}
+ }
if (checkResults.Count > 0)
{
throw new InvalidTxException(tx, checkResults);

Do not dismiss payjoin fee checks