From 0e2c402f81e98d2010c97d3c945f3bcba9048e5b Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 15 Sep 2026 14:24:49 +0200 Subject: [PATCH] include the non-witness utxo in psbts for krux keystores, and in the qr display when the psbt has more than one input --- drongo | 2 +- .../sparrowwallet/sparrow/transaction/HeadersController.java | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drongo b/drongo index 9a8c659b..a19eb5d9 160000 --- a/drongo +++ b/drongo @@ -1 +1 @@ -Subproject commit 9a8c659b49b6cb3010855b74a37e66e076521490 +Subproject commit a19eb5d9d4322469e4e07cd19da3e182cbd56639 diff --git a/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java b/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java index 225e9c8d..ea9f4cab 100644 --- a/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java +++ b/src/main/java/com/sparrowwallet/sparrow/transaction/HeadersController.java @@ -1133,8 +1133,9 @@ public class HeadersController extends TransactionFormController implements Init boolean addBbqrOption = headersForm.getSigningWallet().getKeystores().stream().anyMatch(keystore -> keystore.getWalletModel().showBbqr()); QREncoding encoding = headersForm.getSigningWallet().getKeystores().stream().allMatch(keystore -> keystore.getWalletModel().selectBbqr()) ? QREncoding.BBQR : QREncoding.UR; - //Don't include non witness utxo fields for segwit wallets when displaying the PSBT as a QR - it can add greatly to the time required for scanning - boolean includeNonWitnessUtxos = !Arrays.asList(ScriptType.WITNESS_TYPES).contains(headersForm.getSigningWallet().getScriptType()); + //Don't include non witness utxo fields for segwit wallets when displaying the PSBT as a QR unless required - it can add greatly to the time required for scanning + boolean includeNonWitnessUtxos = !Arrays.asList(ScriptType.WITNESS_TYPES).contains(headersForm.getSigningWallet().getScriptType()) + || (headersForm.getPsbt().getPsbtInputs().size() > 1 && headersForm.getSigningWallet().getKeystores().stream().anyMatch(keystore -> keystore.getWalletModel().includeNonWitnessUtxoForQR())); byte[] psbtBytes = headersForm.getPsbt().getForExport().serialize(true, includeNonWitnessUtxos); CryptoPSBT cryptoPSBT = new CryptoPSBT(psbtBytes);