Browse Source
Merge pull request #441 from meriadec/master
Pass `hasTimestamp` to `signTransaction` (fix Stratis / Stealthcoin)
master
Meriadec Pillet
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
8 additions and
4 deletions
-
package.json
-
src/commands/libcoreSignAndBroadcast.js
-
yarn.lock
|
|
@ -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", |
|
|
|
|
|
@ -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) |
|
|
|
|
|
@ -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" |
|
|
|