1
0
mirror of https://github.com/bigchaindb/js-bigchaindb-driver.git synced 2024-12-28 15:47:50 +01:00

add suport to sign with single or array of private keys

This commit is contained in:
manolodewiner 2018-09-05 12:33:49 +02:00
parent 21eb6a0850
commit 3fd8f7e1bd

View File

@ -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