Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove nonwitnessutxo injection on pre-sign input preparation #377

Merged
merged 1 commit into from
Feb 27, 2024

Conversation

victorkirov
Copy link
Member

🔘 PR Type

What kind of change does this PR introduce?

  • Bugfix

📜 Background

Ledger requires nonWitnessUtxo to be set for segwit inputs in order to not display the non-verified input warning message. However, adding the value results in a PSBT with a slightly different structure, which some integrating apps don't like and they reject the signed PSBT.

🔄 Changes

Does this PR introduce a breaking change?

  • Yes, Incompatible API changes
  • No, Adds functionality (backwards compatible)
  • No, Bug fixes (backwards compatible)

Changes:

  • We now only inject the nonWitnessUtxo value when manually adding inputs into transactions. This means that we won't add it when signing external PSBTs.

Impact:

  • This should allow you to purchase from marketplaces again

✅ Review checklist

Please ensure the following are true before merging:

  • Code Style is consistent with the project guidelines.
  • Code is readable and well-commented.
  • No unnecessary or debugging code has been added.
  • Security considerations have been taken into account.
  • The change has been manually tested and works as expected.
  • Breaking changes and their impacts have been considered and documented.
  • Code does not introduce new technical debt or issues.

Copy link
Contributor

Test this PR with npm i --save-exact @secretkeylabs/[email protected]

@m-aboelenein
Copy link
Member

This makes sense. LGTM 👍

@victorkirov victorkirov merged commit e5ccae9 into develop Feb 27, 2024
3 checks passed
@victorkirov victorkirov deleted the victor/eng-3835-fix-me-ledger-purchase-bug branch February 27, 2024 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants