From 4643fa0ea1e9d05011fe7b01b23e4200fc0066d9 Mon Sep 17 00:00:00 2001 From: Ivan Vershigora Date: Sun, 20 Aug 2023 21:13:14 +0300 Subject: [PATCH] fix: throw error if private key is undefined --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 937300a..8253d89 100644 --- a/src/index.ts +++ b/src/index.ts @@ -140,7 +140,7 @@ export class SilentPayment { let key = ECPair.fromWIF(utxo.WIF).privateKey; if (key === undefined) { - continue; + throw new Error("No private key found for UTXO"); } // If taproot, check if the seckey results in an odd y-value and negate if so