paid-services 4.0.3 → 4.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -208,6 +208,16 @@ module.exports = ({id, lnd, psbt, utxos}, cbk) => {
|
|
|
208
208
|
finalizePsbt: ['ecp', 'signPsbt', ({ecp, signPsbt}, cbk) => {
|
|
209
209
|
const signatures = decodePsbt({ecp, psbt: signPsbt.psbt});
|
|
210
210
|
|
|
211
|
+
// Select the transaction inputs that have a signature
|
|
212
|
+
const inputsWithSignatures = signatures.inputs.filter(input => {
|
|
213
|
+
return !!input.partial_sig || !!input.taproot_key_spend_sig;
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
// Exit early with error when there are no signatures
|
|
217
|
+
if (!inputsWithSignatures.length) {
|
|
218
|
+
return cbk([503, 'UnexpectedFailureToPartiallySignPsbt']);
|
|
219
|
+
}
|
|
220
|
+
|
|
211
221
|
// Create a template transaction to use for the finalized PSBT
|
|
212
222
|
const tx = fromHex(signatures.unsigned_transaction);
|
|
213
223
|
|
package/package.json
CHANGED
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"integration-tests": "tap -j 2 --branches=1 --functions=1 --lines=1 --statements=1 -t 180 test/integration/*.js",
|
|
48
48
|
"test": "tap --branches=1 --functions=1 --lines=1 --statements=1 -t 60 test/actions/*.js test/balanced/*.js test/capacity/*.js test/client/*.js test/config/*.js test/p2p/*.js test/records/*.js test/respond/*.js test/server/*.js test/swaps/*.js test/services/*.js test/trades/*.js"
|
|
49
49
|
},
|
|
50
|
-
"version": "4.0.
|
|
50
|
+
"version": "4.0.4"
|
|
51
51
|
}
|