find the accounts a restored phrase already uses #69

Closed
opened 2026-09-18 06:39:43 +00:00 by grenade · 0 comments
Owner

Parent: #4

Why

#67 lets someone add accounts by hand, but a phrase restored from another Quantus wallet already has the accounts it has: the mobile wallet numbers them and its import runs a BIP-44 gap-limit scan over both schemes to find the ones that exist on chain. Restore here opens account 1 only, so a person who kept their funds on account 2 or 3 sees an empty wallet and has to guess how many times to press "Add account".

Scope

  • After a restore, and from a "Find accounts" button on any open wallet that carries a phrase, scan account numbers under both schemes on the selected chain: derive the addresses, ask the chain which of them exist (System::Account present), and keep scanning while any number in the last batch existed, stopping after a gap of consecutive empty numbers (the mobile wallet uses 20).
  • Every number found is opened in the session and remembered in settings, exactly as "Add account" does, so it comes back on the next unlock.
  • The scan reads existence for a batch of addresses in one request, and says what it found ("2 more accounts" / "nothing beyond account 1").
  • A chain that is not connected, or a wallet with no phrase, offers no scan.

Not in scope

Scanning for wormhole deposits: those are found by the leaf scan already, and a wormhole address is derived per wallet, not per account number.

Acceptance

On the dev node: fund account 3 of a phrase from another wallet, restore that phrase here, and the accounts page shows accounts 1 to 3 with account 3's balance, without pressing anything. On a phrase with nothing beyond account 1, the scan adds nothing and says so.

Parent: #4 ## Why #67 lets someone add accounts by hand, but a phrase restored from another Quantus wallet already has the accounts it has: the mobile wallet numbers them and its import runs a BIP-44 gap-limit scan over both schemes to find the ones that exist on chain. Restore here opens account 1 only, so a person who kept their funds on account 2 or 3 sees an empty wallet and has to guess how many times to press "Add account". ## Scope - After a restore, and from a "Find accounts" button on any open wallet that carries a phrase, scan account numbers under both schemes on the selected chain: derive the addresses, ask the chain which of them exist (`System::Account` present), and keep scanning while any number in the last batch existed, stopping after a gap of consecutive empty numbers (the mobile wallet uses 20). - Every number found is opened in the session and remembered in settings, exactly as "Add account" does, so it comes back on the next unlock. - The scan reads existence for a batch of addresses in one request, and says what it found ("2 more accounts" / "nothing beyond account 1"). - A chain that is not connected, or a wallet with no phrase, offers no scan. ## Not in scope Scanning for wormhole deposits: those are found by the leaf scan already, and a wormhole address is derived per wallet, not per account number. ## Acceptance On the dev node: fund account 3 of a phrase from another wallet, restore that phrase here, and the accounts page shows accounts 1 to 3 with account 3's balance, without pressing anything. On a phrase with nothing beyond account 1, the scan adds nothing and says so.
grenade added the child label 2026-09-18 06:39:49 +00:00
grenade referenced this issue from a commit 2026-09-18 06:47:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: blackbeard/wallet#69