mirror of
https://github.com/bigchaindb/js-bigchaindb-driver.git
synced 2024-11-22 09:46:58 +01:00
fix: remove transaction from delegated signature callback
Signed-off-by: getlarge <ed@getlarge.eu>
This commit is contained in:
parent
a4d8ff531b
commit
344702200d
@ -273,8 +273,7 @@ export default class Transaction {
|
|||||||
.concat(input.fulfills.transaction_id)
|
.concat(input.fulfills.transaction_id)
|
||||||
.concat(input.fulfills.output_index) : serializedTransaction
|
.concat(input.fulfills.output_index) : serializedTransaction
|
||||||
const transactionHash = sha256Hash(transactionUniqueFulfillment)
|
const transactionHash = sha256Hash(transactionUniqueFulfillment)
|
||||||
const fulfillmentUri = signFn(signedTx, input, transactionHash)
|
const fulfillmentUri = signFn(input, transactionHash)
|
||||||
// ? TODO fulfillmentUri should be validated ?
|
|
||||||
input.fulfillment = fulfillmentUri
|
input.fulfillment = fulfillmentUri
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ export const bobCondition = Transaction.makeEd25519Condition(bob.publicKey)
|
|||||||
export const bobOutput = Transaction.makeOutput(bobCondition)
|
export const bobOutput = Transaction.makeOutput(bobCondition)
|
||||||
|
|
||||||
export function delegatedSignTransaction(...keyPairs) {
|
export function delegatedSignTransaction(...keyPairs) {
|
||||||
return function sign(transaction, input, transactionHash) {
|
return function sign(input, transactionHash) {
|
||||||
const filteredKeyPairs = keyPairs.filter(({ publicKey }) =>
|
const filteredKeyPairs = keyPairs.filter(({ publicKey }) =>
|
||||||
input.owners_before.includes(publicKey))
|
input.owners_before.includes(publicKey))
|
||||||
const ed25519Fulfillment = new Ed25519Sha256()
|
const ed25519Fulfillment = new Ed25519Sha256()
|
||||||
|
Loading…
Reference in New Issue
Block a user