createwallet with external signer always picks the first external signer, regardless of how many are connected #22636

issue josibake openend this issue on August 5, 2021
  1. josibake commented at 5:46 pm on August 5, 2021: contributor

    Is your feature request related to a problem? Please describe.

    While testing 22.0rc2 external signer feature, I noticed that if multiple HW wallets are connected to the computer, createwallet will always pick the first one without alerting the user in any way. This led to the following unexpected behavior:

    1. attach a trezor and create a wallet using bitcoin-cli createwallet
    2. attach a coldcard while the trezor is still connected and create a second wallet with bitcoin-cli createwallet

    Both wallets were created fine with no errors, but on further inspection I realized both wallets were connected to the trezor, despite having different names. This is related to #22635

    Describe the solution you’d like

    Ideally, if multiple external signers are returned from enumeratesigners and I then try to create a wallet, I would want createwallet to fail and warn me there are multiple external signers. Additionally, an option to specify the fingerprint of the device would be useful, but I think simply failing would be sufficient for now.

    Describe alternatives you’ve considered

    Granted, this is a rare case where a user would have multiple HW’s connected while creating a single sig wallet, so perhaps just documenting that you should only have one connected at a time is a viable solution.

  2. josibake added the label Feature on Aug 5, 2021
  3. Sjors commented at 9:08 am on May 30, 2022: member
    #25235 adds an error message telling the user to only connect one device at a time. I elaborated in a comment there how I think it should work longer term.
  4. fanquake closed this on Aug 13, 2022

  5. bitcoin locked this on Aug 13, 2023


josibake Sjors

Labels
Feature


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-08 22:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me