@ledgerhq/hw-app-btc
Advanced tools
Comparing version 3.0.2 to 3.1.0-beta.7e23155d
@@ -489,11 +489,7 @@ "use strict"; | ||
inputs: [], | ||
version: defaultVersion | ||
version: defaultVersion, | ||
timestamp: Buffer.alloc(0) | ||
}; | ||
var getTrustedInputCall = segwit ? this.getTrustedInputBIP143.bind(this) : this.getTrustedInput.bind(this); | ||
var outputScript = Buffer.from(outputScriptHex, "hex"); | ||
var timestamp = Buffer.alloc(0); | ||
if (hasTimestamp) { | ||
timestamp = Buffer.alloc(4); | ||
timestamp.writeUInt32LE(Math.floor((initialTimestamp + (Date.now() - startTime)) / 1000), 0); | ||
} | ||
@@ -540,2 +536,7 @@ return (0, _utils.foreach)(inputs, function (input) { | ||
}).then(function () { | ||
if (hasTimestamp) { | ||
targetTransaction.timestamp = Buffer.alloc(4); | ||
targetTransaction.timestamp.writeUInt32LE(Math.floor((initialTimestamp + (Date.now() - startTime)) / 1000), 0); | ||
} | ||
}).then(function () { | ||
return (0, _utils.doIf)(segwit, function () { | ||
@@ -597,3 +598,3 @@ return ( | ||
var result = Buffer.concat([_this5.serializeTransaction(targetTransaction, false, timestamp), outputScript]); | ||
var result = Buffer.concat([_this5.serializeTransaction(targetTransaction, false, targetTransaction.timestamp), outputScript]); | ||
@@ -600,0 +601,0 @@ if (segwit) { |
{ | ||
"name": "@ledgerhq/hw-app-btc", | ||
"version": "3.0.2", | ||
"version": "3.1.0-beta.7e23155d", | ||
"description": "Ledger Hardware Wallet Bitcoin Application API", | ||
@@ -28,3 +28,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@ledgerhq/hw-transport": "^3.0.0", | ||
"@ledgerhq/hw-transport": "^3.1.0-beta.7e23155d", | ||
"create-hash": "^1.1.3" | ||
@@ -31,0 +31,0 @@ }, |
@@ -500,3 +500,4 @@ //@flow | ||
inputs: [], | ||
version: defaultVersion | ||
version: defaultVersion, | ||
timestamp: Buffer.alloc(0) | ||
}; | ||
@@ -507,10 +508,2 @@ const getTrustedInputCall = segwit | ||
const outputScript = Buffer.from(outputScriptHex, "hex"); | ||
let timestamp = Buffer.alloc(0); | ||
if (hasTimestamp) { | ||
timestamp = Buffer.alloc(4); | ||
timestamp.writeUInt32LE( | ||
Math.floor((initialTimestamp + (Date.now() - startTime)) / 1000), | ||
0 | ||
); | ||
} | ||
@@ -566,2 +559,11 @@ return foreach(inputs, input => { | ||
) | ||
.then(() => { | ||
if (hasTimestamp) { | ||
targetTransaction.timestamp = Buffer.alloc(4); | ||
targetTransaction.timestamp.writeUInt32LE( | ||
Math.floor((initialTimestamp + (Date.now() - startTime)) / 1000), | ||
0 | ||
); | ||
} | ||
}) | ||
.then(() => | ||
@@ -652,3 +654,7 @@ doIf(segwit, () => | ||
var result = Buffer.concat([ | ||
this.serializeTransaction(targetTransaction, false, timestamp), | ||
this.serializeTransaction( | ||
targetTransaction, | ||
false, | ||
targetTransaction.timestamp | ||
), | ||
outputScript | ||
@@ -655,0 +661,0 @@ ]); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
192940
2248
1
+ Added@ledgerhq/hw-transport@3.1.0-beta.da8a3a7f(transitive)
- Removed@ledgerhq/hw-transport@3.0.0(transitive)