From b00325b5fc9caa8ef216fe49b1d652e946f8b6c8 Mon Sep 17 00:00:00 2001 From: meriadec Date: Thu, 15 Nov 2018 17:26:28 +0100 Subject: [PATCH] Correctly build additionals for decred --- src/commands/libcoreSignAndBroadcast.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/commands/libcoreSignAndBroadcast.js b/src/commands/libcoreSignAndBroadcast.js index 542fb715..e907faf1 100644 --- a/src/commands/libcoreSignAndBroadcast.js +++ b/src/commands/libcoreSignAndBroadcast.js @@ -117,6 +117,7 @@ async function signTransaction({ } } else if (currency.id === 'decred') { expiryHeight = Buffer.from([0x00, 0x00, 0x00, 0x00]) + additionals.push('decred') } const rawInputs = transaction.getInputs() @@ -124,10 +125,6 @@ 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(