From 958d9c52746c1c41ec47cdb9162651b7ff80493f Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Fri, 31 Jul 2020 11:48:13 +0200 Subject: [PATCH] handle finalized psbts --- .../sparrowwallet/drongo/wallet/FinalizingPSBTWallet.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sparrowwallet/drongo/wallet/FinalizingPSBTWallet.java b/src/main/java/com/sparrowwallet/drongo/wallet/FinalizingPSBTWallet.java index 543bbe5..d80c1f9 100644 --- a/src/main/java/com/sparrowwallet/drongo/wallet/FinalizingPSBTWallet.java +++ b/src/main/java/com/sparrowwallet/drongo/wallet/FinalizingPSBTWallet.java @@ -18,7 +18,7 @@ import java.util.stream.IntStream; /** * This is a special wallet that is used solely to finalize a fully signed PSBT by reading from the partial signatures and UTXO scriptPubKey - * It is used when the normal wallet is not available. + * It is used when the normal wallet is not available, for example when the wallet file is kept in an offline only setting */ public class FinalizingPSBTWallet extends Wallet { private final Map signedInputNodes = new LinkedHashMap<>(); @@ -28,8 +28,8 @@ public class FinalizingPSBTWallet extends Wallet { public FinalizingPSBTWallet(PSBT psbt) { super("Finalizing PSBT Wallet"); - if(!psbt.isSigned() || psbt.isFinalized()) { - throw new IllegalArgumentException("Only a fully signed, unfinalized PSBT can be used"); + if(!psbt.isSigned()) { + throw new IllegalArgumentException("Only a fully signed or finalized PSBT can be used"); } WalletNode purposeNode = getNode(KeyPurpose.RECEIVE);