auto import, add coolwallet S weird derivation path #7259
Would be nice to auto detect also coolwallet S derivation path.
In file bip39_wallet_formats.json :
{ "description": "coolwallet S derivation path using bip44 but with segwit script format",
"derivation_path": "m/44'/0'/0'",
"script_type": "p2wpkh-p2sh",
"iterate_accounts": true
}
see https://help.coolwallet.io/article/160-recover-btc-using-coolwallet-s-seed-without-the-wallet for their recovery instruction
Beginner users often ask why they cannot send their full balance.
Hence, this intends to reduce support load.
In terms of UI, maybe there is a better way to do this but this was
easy to do and still a good first step IMHO.
Tolerates discrepancies in the swap amount crosschecks. To ensure we
calculate the send/receive amounts correctly we apply a check, using
amount inversion. The inversion is not exact up to +-1 due to used
floor and ceil functions in the methods. They are not invertible,
which is why we relax the check to off-by-ones.
Rebased our branches on latest p4a develop HEAD and buildozer master HEAD.
Re `android.allow_backup = False` in buildozer.spec, now that this setting
has been exposed to buildozer.spec (see https://github.com/kivy/buildozer/pull/1206),
we could finally drop a commit from our branch that did the same:
7a7d415d90
Re commenting out `android.arch` in buildozer.spec, we are setting this
via the ENV VAR in make_apk.
Previously, during early-startup (until configure_logging(config) is
called in run_electrum),
- the stderr log handler lost all log messages below warning level, and
- the file log handler lost all log messages regardless of log level
We now instead start buffering log messages in memory as soon as
electrum.logging is imported. The buffer is dumped into the
stderr and file log handlers when they are fully set up, and then
the buffer is discarded (and the temporary log handler is removed).
Note that messages are not logged until configure_logging() is called.
Previously WARNING/ERROR messages would get logged immediately to stderr,
but not anymore. This was changed so that the order of the log messages
can be kept intact. (if we log WARNINGs immediately, but need to delay
INFOs until the config is available, messages would either be out of order
or alternatively there would be duplicates)
Relatedly, we now follow the recommendation of the python docs re
logging for libraries [0]: we try to only configure logging if running via
run_electrum (the main script) and not when e.g. a 3rd party script
imports electrum.
[0]: https://docs.python.org/3/howto/logging.html#configuring-logging-for-a-library
E.g. on Windows, files open in one process cannot be deleted by another process.
With file logging enabled, if an old logfile was open in a text editor,
Electrum could crash during startup.
```
E | __main__ |
Traceback (most recent call last):
File "...\electrum\run_electrum", line 391, in main
handle_cmd(
File "...\electrum\run_electrum", line 403, in handle_cmd
configure_logging(config)
File "...\electrum\electrum\logging.py", line 278, in configure_logging
_configure_file_logging(log_directory)
File "...\electrum\electrum\logging.py", line 107, in _configure_file_logging
_delete_old_logs(log_directory)
File "...\electrum\electrum\logging.py", line 98, in _delete_old_logs
os.remove(str(f))
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: '...\\AppData\\Roaming\\Electrum\\testnet\\logs\\electrum_log_20210414T023751Z_25008.log'
```
fixes#7198
We recently bumped the bundled version of PyQt (5.14.2->5.15.4).
It seems the new version has a lot more dynamic dependencies.
From https://doc.qt.io/qt-5/linux-requirements.html :
> From Qt 5.15 onwards, Qt does require libxcb 1.11. Also, the -qt-xcb
> configure option got removed that was bundling some of the libs below.
We are using the prebuilt wheels for PyQt5 from PyPI. Presumably those
had previously been built using the -qt-xcb option.
In some places in the script if some directory name had spaces it could cause issues.
I also added quotes around a few other directory names that currently are hardcoded with names without spaces as a way to prevent any future mishap