From 96cb58f41275ad1afd8925ad7ee6f48c95655225 Mon Sep 17 00:00:00 2001 From: meriadec Date: Mon, 4 Jun 2018 10:38:43 +0200 Subject: [PATCH] Pass `hasTimestamp` to `signTransaction` (fix Stratis / Stealthcoin) --- package.json | 2 +- src/commands/libcoreSignAndBroadcast.js | 4 ++++ yarn.lock | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 739df6a2..e12a1d47 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "@ledgerhq/hw-app-xrp": "^4.12.0", "@ledgerhq/hw-transport": "^4.12.0", "@ledgerhq/hw-transport-node-hid": "^4.12.0", - "@ledgerhq/ledger-core": "1.4.3", + "@ledgerhq/ledger-core": "1.4.4", "@ledgerhq/live-common": "^2.25.0", "axios": "^0.18.0", "babel-runtime": "^6.26.0", diff --git a/src/commands/libcoreSignAndBroadcast.js b/src/commands/libcoreSignAndBroadcast.js index 130397f8..7823fe44 100644 --- a/src/commands/libcoreSignAndBroadcast.js +++ b/src/commands/libcoreSignAndBroadcast.js @@ -85,6 +85,9 @@ export async function doSignAndBroadcast({ njsWalletCurrency.bitcoinLikeNetworkParameters.SigHash, ) + const hasTimestamp = njsWalletCurrency.bitcoinLikeNetworkParameters.UsesTimestampedTransaction + // TODO: const timestampDelay = njsWalletCurrency.bitcoinLikeNetworkParameters.TimestampDelay + const currency = getCryptoCurrencyById(account.currencyId) const signedTransaction = await core.signTransaction({ hwApp, @@ -92,6 +95,7 @@ export async function doSignAndBroadcast({ sigHashType: parseInt(sigHashType, 16).toString(), supportsSegwit: !!currency.supportsSegwit, isSegwit: account.isSegwit, + hasTimestamp, }) const txHash = await njsAccount.asBitcoinLikeAccount().broadcastRawTransaction(signedTransaction) diff --git a/yarn.lock b/yarn.lock index ba593aec..d198ae78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1482,9 +1482,9 @@ dependencies: events "^2.0.0" -"@ledgerhq/ledger-core@1.4.3": - version "1.4.3" - resolved "https://registry.yarnpkg.com/@ledgerhq/ledger-core/-/ledger-core-1.4.3.tgz#6cc44560e5a8fb35f85c8ad9fbae56436eacfc94" +"@ledgerhq/ledger-core@1.4.4": + version "1.4.4" + resolved "https://registry.yarnpkg.com/@ledgerhq/ledger-core/-/ledger-core-1.4.4.tgz#36e1d41fee921e1635361b87e342ddec12293c0b" dependencies: "@ledgerhq/hw-app-btc" "^4.7.3" "@ledgerhq/hw-transport-node-hid" "^4.7.6"