if a device is unplugged and then replugged before we notice (via scan_devices) then it will get into an unusable state, throwing all kinds of low level exceptions when we don't expect it. affects ledger, keepkey, dbb, but for some reason not trezor.
- separation between Wallet and key management (Keystore)
- simplification of wallet classes
- remove support for multiple accounts in the same wallet
- add support for OP_RETURN to Trezor plugin
- split multi-accounts wallets for backward compatibility
Only require the user to input the passphrase once, unless creating
a wallet.
Should they mis-enter the passphrase, they will be warned Electrum
couldn't pair the device, and when they actually need to use it
they will be prompted again.
Fixes#1672
We're going to want to do a few things differently, such as
device recovery. So move the client code to clientbase.py
and create a per-plugin client.py file for the derived client
class.
Use a shared device manager across USB devices (not yet taken
advantage of by ledger). This reduces USB scans and abstracts
device management cleanly.
We no longer scan at regular intervals in a background thread.
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