Skip to content

Add Account dialog defaults to existing Account #0 without warning, causing derivation path duplicates #2001

@Sponge5663

Description

@Sponge5663

Describe the bug
When adding a new account to an existing singlesig wallet, the "Add Account" dialog defaults to "Account #0" even if Account #0 already exists. If the user clicks OK without manually changing the dropdown, Sparrow imports the xpub for Account #0 again, creating a duplicate derivation path under a new tab name. This corrupts the wallet's transaction mapping and splits history between tabs.

To Reproduce
Steps to reproduce the behavior:

  1. Create a wallet with Account #0 (e.g., Native Segwit)
  2. Add Account #1, give it a name
  3. Click "Add Account..." again
  4. Dialog shows "Account #0" as the default option
  5. Click OK without changing the dropdown
  6. Sparrow creates a new tab with the same derivation path as Account #0
  7. Transaction history becomes split/corrupted across tabs

Expected behavior
The "Add Account" dialog should either:

  • Default to the next unused account number (e.g., Account #2 if #0 and #1 exist
Image

), OR

  • Gray out/disable already-used account numbers, OR
  • Show a warning if the user selects an already-used account

Screenshots
[Screenshot showing Account #0 offered when it already exists]
Image)
Sparrow Version: 2.5.1
OS: macOS / Linux Mint

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions