cryptoadvance / specter-desktop

A desktop GUI for Bitcoin Core optimised to work with hardware wallets
MIT License
802 stars 238 forks source link

Create separate UI for multisig registrations for Jades #2367

Open moneymanolis opened 1 year ago

moneymanolis commented 1 year ago

More background

The current implementation of automatically registering the multisig in the sign_tx function for Jades creates problems for multisig wallets using multi()descriptors as we can't pass the wallet descriptor type down to the HWI command without changing the HWI lib implementation. It would be better to create a UI for registering the multisig in a place where we have access to the wallet descriptor and then just check when signing whether we have a matching multisig config. BTW, if there is no multisig config, change output is just treated as another output (as expected).

Solution Ideas

In any case: Remove the code to automatically register a multisig when signing with Jades via USB.

Then: a) Enable the existing Export wallet to device functionality for Jades. b) Another option: Add another button on the device screen for Jades (if they are used in a multisig) to "Register Multisig Configuration" below and r

k9ert commented 1 year ago

I think, the UI part for that is called "export to device", here: https://github.com/cryptoadvance/specter-desktop/blob/master/src/cryptoadvance/specter/templates/wallet/settings/wallet_settings.jinja#L84-L122

Unfortunately, hwi-devices don't support that at all.

But could still be implemented directly in jade. In the specter this implementes like this.