From 3fd8f7e1bd8d490a7fd5cb4900cf2f1ac82376f9 Mon Sep 17 00:00:00 2001 From: manolodewiner Date: Wed, 5 Sep 2018 12:33:49 +0200 Subject: [PATCH] add suport to sign with single or array of private keys --- src/transaction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/transaction.js b/src/transaction.js index f28f70a..88f821e 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -236,7 +236,7 @@ export default class Transaction { Transaction.serializeTransactionIntoCanonicalString(transaction) signedTx.inputs.forEach((input, index) => { - const privateKey = privateKeys[index] + const privateKey = privateKeys[index] ? privateKeys[index] : privateKeys[0] const privateKeyBuffer = Buffer.from(base58.decode(privateKey)) const transactionUniqueFulfillment = input.fulfills ? serializedTransaction