This repository has been archived by the owner on Jun 27, 2022. It is now read-only.
Split hw-app-btc, refactor in async/await, progress events #437
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
the monolithic code of Btc.js has been
What this PR didn't do:
createPaymentTransactionNew
andsignP2SHTransaction
There is also a signature change for the methods
createPaymentTransactionNew
andsignP2SHTransaction
: basically instead of taking many arguments, it's now one object with named fields:The previous signature is still supported, but a console.warn deprecated message will appear. Support will be dropped in next major bump.
createPaymentTransactionNew
onDevice* callbacksSigning a BTC transaction can take time so we have introduced some callback to track the events:
This allows to track the progress events when the utxo are streaming to the device before and after the signature, and also to know when the signature is effectively displayed on the device.
In Ledger Live codebase, we aim to have a uniform interface for this and we might later refactor our hw-app-* libraries to have a same interface too.