bigchaindb-driver
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -320,6 +320,7 @@ 'use strict'; | ||
var signedTx = (0, _clone2.default)(transaction); | ||
var serializedTransaction = Transaction.serializeTransactionIntoCanonicalString(transaction); | ||
signedTx.inputs.forEach(function (input, index) { | ||
var privateKey = privateKeys[index]; | ||
var privateKeyBuffer = _buffer.Buffer.from(_bs2.default.decode(privateKey)); | ||
var serializedTransaction = Transaction.serializeTransactionIntoCanonicalString(transaction); | ||
@@ -335,4 +336,4 @@ var transactionUniqueFulfillment = input.fulfills ? serializedTransaction.concat(input.fulfills.transaction_id).concat(input.fulfills.output_index) : serializedTransaction; | ||
var serializedTransaction = Transaction.serializeTransactionIntoCanonicalString(signedTx); | ||
signedTx.id = (0, _sha256Hash2.default)(serializedTransaction); | ||
var serializedSignedTransaction = Transaction.serializeTransactionIntoCanonicalString(signedTx); | ||
signedTx.id = (0, _sha256Hash2.default)(serializedSignedTransaction); | ||
return signedTx; | ||
@@ -339,0 +340,0 @@ } |
{ | ||
"name": "bigchaindb-driver", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "Node.js driver for BigchainDB", | ||
@@ -52,4 +52,4 @@ "homepage": "https://www.bigchaindb.com/", | ||
"babel-runtime": "^6.26.0", | ||
"cross-env": "^5.1.4", | ||
"documentation": "^6.3.2", | ||
"cross-env": "^5.2.0", | ||
"documentation": "^8.0.0", | ||
"eslint": "^4.19.1", | ||
@@ -59,9 +59,9 @@ "eslint-config-ascribe": "^3.0.5", | ||
"husky": "^0.14.3", | ||
"lint-staged": "^7.0.0", | ||
"nyc": "^11.6.0", | ||
"lint-staged": "^7.1.2", | ||
"nyc": "^12.0.1", | ||
"release-it": "^7.2.1", | ||
"rimraf": "^2.6.2", | ||
"sinon": "^5.0.0", | ||
"webpack": "^4.8.3", | ||
"webpack-cli": "^2.0.13" | ||
"sinon": "^6.0.0", | ||
"webpack": "^4.12.0", | ||
"webpack-cli": "^3.0.4" | ||
}, | ||
@@ -68,0 +68,0 @@ "dependencies": { |
@@ -231,7 +231,8 @@ import { Buffer } from 'buffer' | ||
const signedTx = clone(transaction) | ||
const serializedTransaction = | ||
Transaction.serializeTransactionIntoCanonicalString(transaction) | ||
signedTx.inputs.forEach((input, index) => { | ||
const privateKey = privateKeys[index] | ||
const privateKeyBuffer = Buffer.from(base58.decode(privateKey)) | ||
const serializedTransaction = | ||
Transaction.serializeTransactionIntoCanonicalString(transaction) | ||
@@ -249,7 +250,7 @@ const transactionUniqueFulfillment = input.fulfills ? serializedTransaction | ||
const serializedTransaction = | ||
const serializedSignedTransaction = | ||
Transaction.serializeTransactionIntoCanonicalString(signedTx) | ||
signedTx.id = sha256Hash(serializedTransaction) | ||
signedTx.id = sha256Hash(serializedSignedTransaction) | ||
return signedTx | ||
} | ||
} |
@@ -148,3 +148,3 @@ import test from 'ava' | ||
return conn.postTransactionCommit(transferTxSigned1) | ||
.then(conn.postTransactionCommit(transferTxSigned2)) | ||
.then(() => conn.postTransactionCommit(transferTxSigned2)) | ||
.then(() => { | ||
@@ -151,0 +151,0 @@ const transferTxMultipleInputs = Transaction.makeTransferTransaction( |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
25518999
26846
2