The issue is electrum uses None as the current account
to mean the default account. This just gave rise to
all addresses being listed including in hidden accounts.
Really "None" as used in main_window.py and history_widget.py
means "a single unspecified account" not "all accounts".
So implement the idea of a default account, and don't let
a hidden account be the default one.
Unfortunately there was root_name and root_derivation confusion
in the past for classes derived from BIP_32_HD_Wallet.
Address derivation used root_name and so would begin with 'x/'
whereas it should have begun with root_derivation, and so started
with 'm/'.
This fixes that old wart and removes some fudges from the trezor
code that used to work around it.
Benefits of this rewrite include:
- support of disconnecting / reconnecting a device without having
to close the wallet, even in a different USB socket
- support of multiple keepkey / trezor devices, both during wallet
creation and general use
- wallet is watching-only dynamically according to whether the
associated device is currently plugged in or not
Break out the workflow logic of the install wizard
into a base class. This means reimplementing with
full support in a new GUI is now easy; you just provide
ways to request passwords, show messages etc. The API
is fully documented in the base class.
There are a couple of minor outstanding issues, including that
the old messages shown when recovering a wallet are missing.
I will come back to that. Ledger wallet might be broken.
Other improvements:
The install wizard code is now easy to follow and understand.
Hardware wallets can now be restored without any need for their
accompanying libraries.
Various bits of trustedcoin were broken and have been fixed.
Many plugin hooks can be removed. I have only started on this.
They have a different wallet type; they require no plugin nor
plugin libraries to use.
Remove pointless public key code that was implemented in the
base classes already.
Partial fix for #1592. Unfortunately the plugin and library
are still required to actually restore the wallet, but for
no reason that isn't fixable.