KhalilBellakrid
6 years ago
No known key found for this signature in database
GPG Key ID: 832CFB62DD2E7D24
2 changed files with
8 additions and
0 deletions
-
src/commands/libcoreSignAndBroadcast.js
-
src/config/cryptocurrencies.js
|
|
@ -115,6 +115,8 @@ async function signTransaction({ |
|
|
|
if (blockHeight >= 419200) { |
|
|
|
additionals.push('sapling') |
|
|
|
} |
|
|
|
} else if (currency.id === 'decred') { |
|
|
|
expiryHeight = Buffer.from([0x00, 0x00, 0x00, 0x00]) |
|
|
|
} |
|
|
|
const rawInputs = transaction.getInputs() |
|
|
|
|
|
|
@ -122,6 +124,10 @@ async function signTransaction({ |
|
|
|
|
|
|
|
const inputs = await Promise.all( |
|
|
|
rawInputs.map(async input => { |
|
|
|
const additionals = [] |
|
|
|
if (currency.id === 'decred') { |
|
|
|
additionals.push('decred') |
|
|
|
} |
|
|
|
const rawPreviousTransaction = await input.getPreviousTransaction() |
|
|
|
const hexPreviousTransaction = Buffer.from(rawPreviousTransaction).toString('hex') |
|
|
|
const previousTransaction = hwApp.splitTransaction( |
|
|
@ -129,6 +135,7 @@ async function signTransaction({ |
|
|
|
currency.supportsSegwit, |
|
|
|
hasTimestamp, |
|
|
|
hasExtraData, |
|
|
|
additionals, |
|
|
|
) |
|
|
|
const outputIndex = input.getPreviousOutputIndex() |
|
|
|
const sequence = input.getSequence() |
|
|
|
|
|
@ -27,6 +27,7 @@ const supported: CryptoCurrencyIds[] = [ |
|
|
|
'stealthcoin', |
|
|
|
'poswallet', |
|
|
|
'clubcoin', |
|
|
|
'decred', |
|
|
|
'bitcoin_testnet', |
|
|
|
] |
|
|
|
|
|
|
|