Skip to content

Commit

Permalink
Merge pull request LedgerHQ#223 from meriadec/master
Browse files Browse the repository at this point in the history
Ensure sequence is passed even with empty script when creating transaction
  • Loading branch information
meriadec authored Oct 10, 2018
2 parents aeaefa0 + 2b3ed5a commit c03a772
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/hw-app-btc/src/Btc.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ export default class Btc {
}
offset += blockSize;
}

// Handle case when no script length: we still want to pass the sequence
// relatable: https://github.com/LedgerHQ/ledger-live-desktop/issues/1386
if (script.length === 0) {
scriptBlocks.push(sequence);
}

return eachSeries(scriptBlocks, scriptBlock =>
this.getTrustedInputRaw(scriptBlock)
);
Expand Down

0 comments on commit c03a772

Please sign in to comment.