* Fix#4073
* Account for if the wallet is already in the daemon
* Only start a new thread if it doesn't exist
* Modify run_and_get_wallet to not return duplicate wallets
* Inform user if encrypted wallet is already open in memory
If the attribute does not exist (presumably in older versions of Qt),
this change prevents the following error:
AttributeError: type object 'Qt' has no attribute 'AA_ShareOpenGLContexts'
Makes this go away:
"Qt WebEngine seems to be initialized from a plugin. Please set Qt::AA_ShareOpenGLContexts using QCoreApplication::setAttribute before constructing QGuiApplication."
Issue: #2209
Fixes this error when signing with a HW wallet:
./electrum
[xcb] Unknown sequence number while processing queue
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
python3: xcb_io.c:259: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed.
Aborted (core dumped)
The cause is likely with the `show_message()` calls. The proper fix
would be to hunt down where QT Gui elements are touched from a wrong
thread.
The workaround is to call XInitThreads(), as the error message suggests.
- a keypair is derived from the wallet password
- only the public key is retained in memory
- wallets must opened and closed explicitly with the daemon
- 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