paulmillr / scure-btc-signer

Audited & minimal library for creating, signing & decoding Bitcoin transactions.
https://paulmillr.com/noble/#scure
MIT License
151 stars 39 forks source link

fix: Updating nonWitnessUtxo on input to undefined #63

Closed victorkirov closed 10 months ago

victorkirov commented 10 months ago

Currently, if you want to remove the nonWitnessUtxo field from an input, it is not possible using the updateInput method as the logic takes the existing nonWitnessUtxo value if a value of undefined is passed in.

This fixes the issue and will delete the nonWitnessUtxo value if an input is updated with an undefined value for that field.