From 344702200d86bcebe28eeb7b367fd91e3fc3af6e Mon Sep 17 00:00:00 2001 From: getlarge Date: Thu, 17 Dec 2020 08:32:15 +0100 Subject: [PATCH] fix: remove transaction from delegated signature callback Signed-off-by: getlarge --- src/transaction.js | 3 +-- test/constants.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/transaction.js b/src/transaction.js index fc2becd..3c6f3fb 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -273,8 +273,7 @@ export default class Transaction { .concat(input.fulfills.transaction_id) .concat(input.fulfills.output_index) : serializedTransaction const transactionHash = sha256Hash(transactionUniqueFulfillment) - const fulfillmentUri = signFn(signedTx, input, transactionHash) - // ? TODO fulfillmentUri should be validated ? + const fulfillmentUri = signFn(input, transactionHash) input.fulfillment = fulfillmentUri }) diff --git a/test/constants.js b/test/constants.js index 1888ce9..b1708e9 100644 --- a/test/constants.js +++ b/test/constants.js @@ -34,7 +34,7 @@ export const bobCondition = Transaction.makeEd25519Condition(bob.publicKey) export const bobOutput = Transaction.makeOutput(bobCondition) export function delegatedSignTransaction(...keyPairs) { - return function sign(transaction, input, transactionHash) { + return function sign(input, transactionHash) { const filteredKeyPairs = keyPairs.filter(({ publicKey }) => input.owners_before.includes(publicKey)) const ed25519Fulfillment = new Ed25519Sha256()