Background
Currently the number of IDs you’ve generated is stored in local storage, and you’re shown that number of IDs in the list. If you import your account on another device, you start back at the primary ID and have to awkwardly keep pressing “Create New ID” to restore the other ones.
Likewise, users can end up creating a bunch of IDs that effectively do nothing for them, with no way of removing them from the UI, and little understanding of what they’re for.
Proposal
- At certain events (e.g. account import, clicking a refresh button) or intervals (e.g. once a day) we should “scan” IDs to see if they have any meaningful activity on them (profile.json with meaningful data, BTC balance, an id assigned.)
- Rather than tracking how high their index is, we’ll keep an array of meaningful IDs in local storage. These will be shown automatically.
- “Creating” a new ID will only be available once you’ve done something with the previously indexed ID.
This is all somewhat like BIP-44. While discovery will have to have some additional wiggle room since we haven’t been enforcing proposal #3 (maybe search the next 10 indexes for an account, rather than just increment by one) it should more or less be the same.
Questions
It would be good to know the following before starting work on this:
- How many IDs do people have? Could this be problematic / slow if it gets into the hundreds?
- Do users ever restore their account offline? How should we handle the scan if they do?
- How frequently should we automatically check for new IDs?
- Should we offer an escape hatch for people who have their IDs stretched apart by more than the search finds? Maybe they just enter an index and it adds the ID to the array of IDs, even if it’s empty?