Add non-witness-utxos and xpubs when using hwi with ledger #1888
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.
Currently, Specter Desktop doesn't add the global xpubs to the psbt when signing transactions with ledger devices. Since HWI uses them to figure out the right parameters for the hardware wallet, HWI falls back to the legacy protocol.
The next release of the Ledger bitcoin app (version 2.1.0) will remove compatiblity with the legacy protocol (before version 2.0.0 of the app), so it will not be able to sign with HWI psbts without the global xpubs.
This instructs Specter to add the xpubs.
Moreover, it also adds the non-witness-utxos, since a warning would be shown if the non-witness-utxo is missing on segwitv0 transactions.
Closes: #1886