1
0
Commit Graph

1165 Commits

Author SHA1 Message Date
Sander van Grieken
8ba7a00097 qml: update new labels in history and addresscoinlist 2023-12-12 16:36:12 +01:00
Sander van Grieken
3a22cb9c48 labels: emit callback when labels received.
write labels regardless if there's already a label set for an ID.
2023-12-12 16:24:13 +01:00
Sander van Grieken
a6ceeec09d qml: add frozen lightning to BalanceDetails, indent frozen on-chain and lightning amounts 2023-12-12 13:17:57 +01:00
Sander van Grieken
297f971fae qml: improve info text for incomplete transactions and transactions in mempool on transaction details page. 2023-12-12 12:11:37 +01:00
ghost43
e814fa0b25 Merge pull request #8719 from SomberNight/202312_db_seedtype
wallet db: deduplicate "seed_type" field
2023-12-12 01:01:30 +00:00
Sander van Grieken
82ee4c22b8 qml: fix old ref to network.tor_proxy 2023-12-11 16:47:56 +01:00
ThomasV
8199a6b5b2 Merge pull request #8733 from accumulator/remove_2fa_email
qt, qml: remove email entry from 2FA wallet ToS pages
2023-12-10 12:39:51 +01:00
Sander van Grieken
d8d2426e83 qml: add local/remote SCID alias to ChannelDetails 2023-12-08 14:17:14 +01:00
Sander van Grieken
4c8287358a qt, qml: remove email entry from 2FA wallet ToS pages 2023-12-08 12:07:03 +01:00
Sander van Grieken
b87d091a6d qt, qml: allow BIP39 seeds which fail checksum or wordlist (fixes #8720)
removes verifySeed from qebitcoin as this code was 99% duplicate of wizard.validate_seed
2023-12-06 16:12:57 +01:00
ghost43
1cc1926263 Merge pull request #8725 from accumulator/bolt11_lowercase
qt, qml: use lowercase bolt11 when copying or sharing
2023-12-05 17:29:09 +00:00
accumulator
134fd6c656 Merge pull request #8714 from accumulator/tor_probe
network: async tor probe
2023-12-04 16:45:03 +01:00
Sander van Grieken
24c28409b3 qt, qml: use lowercase bolt11 when copying or sharing 2023-12-04 16:42:49 +01:00
Sander van Grieken
0d476f73df network: rename network.tor_proxy to network.is_proxy_tor and keep it at None until TOR probe is done. 2023-12-04 10:42:32 +01:00
SomberNight
f7cb523b9d wallet db: deduplicate "seed_type" field
In the db, the 'seed_type' field could be present both at the top-level and inside keystores.

Note:
- both fields had usages
- the top-level field was added in 2.8 re "initial segwit support" (3a64ec0f2e)
  - there was no db upgrade for it, so older files are missing it
  - if present, valid values can be electrum types but also
    other types supported by the wizard, e.g. "bip39"
- the keystore-level field was added in 4.1 (7b7bba2299)
  - there was a db upgrade when it was introduced, so old files also have it
  - if present, valid values can only be electrum types
- there is not much value in the top-level one having a non-electrum value,
  and those values were never used by other parts of the code
  - note that when creating a standard wallet from a bip39 seed, the seed is discarded.
    Only the derived xprv and the derivation path are kept. If we changed this and also kept the seed,
    e.g. to display it to the user, then it would make sense to save the seed type (e.g. "bip39").
    However storing that seed_type would make more sense at the keystore level (not top-level).

We delete the top-level 'seed_type' field.

```
{
    "keystore": {
        "seed_type": "segwit",
        ...
    },
    "seed_type": "segwit",
    ...
}
```
2023-12-01 18:43:37 +00:00
SomberNight
64f82cd260 qt wizard bip39 recovery: better handle --offline mode
```
 32.40 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/gui/qt/wizard/wallet.py", line 709, in <lambda>
    button.clicked.connect(lambda: Bip39RecoveryDialog(self, get_account_xpub, on_account_select))
  File "/home/user/wspace/electrum/electrum/gui/qt/bip39_recovery_dialog.py", line 40, in __init__
    fut = asyncio.run_coroutine_threadsafe(coro, network.asyncio_loop)
AttributeError: 'NoneType' object has no attribute 'asyncio_loop'
```
2023-12-01 17:37:58 +00:00
SomberNight
6c213aca17 pyinstaller build fixes 2023-11-30 14:08:06 +00:00
SomberNight
2c3c50a09b mac build: fix pyinstaller erroring due to not being able to import pyqt6
Not sure why this a problem in the mac build but not in the windows build...

Also not sure why this only came up now -- was working before.
(I changed a few things in prev commits re the build scripts but I can't see the cause)

```
34827 INFO: Processing module hooks...
34828 INFO: Loading module hook 'hook-cryptography.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
35932 INFO: Loading module hook 'hook-mnemonic.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
35937 INFO: Loading module hook 'hook-certifi.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
35939 INFO: Loading module hook 'hook-dns.rdata.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...
36502 INFO: Loading module hook 'hook-usb1.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/usb1/__pyinstaller'...
36503 INFO: --- libusb1 pyinstaller hook ---
36504 INFO: Added libusb binaries: []
36505 INFO: Loading module hook 'hook-sqlite3.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
36932 INFO: Loading module hook 'hook-pkg_resources.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
38303 INFO: Loading module hook 'hook-PyQt5.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
38584 WARNING: Hidden import "sip" not found!
38586 INFO: Loading module hook 'hook-xml.etree.cElementTree.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
38587 INFO: Loading module hook 'hook-lib2to3.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
38678 INFO: Loading module hook 'hook-_tkinter.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
39005 INFO: checking Tree
39006 INFO: Building Tree because Tree-00.toc is non existent
39006 INFO: Building Tree Tree-00.toc
39021 INFO: checking Tree
39022 INFO: Building Tree because Tree-01.toc is non existent
39022 INFO: Building Tree Tree-01.toc
39157 INFO: checking Tree
39158 INFO: Building Tree because Tree-02.toc is non existent
39158 INFO: Building Tree Tree-02.toc
39165 INFO: Loading module hook 'hook-encodings.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
39568 INFO: Loading module hook 'hook-distutils.util.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
39586 INFO: Loading module hook 'hook-platform.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
39587 INFO: Loading module hook 'hook-PyQt5.QtGui.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
39734 INFO: Loading module hook 'hook-PyQt5.QtPrintSupport.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
39984 INFO: Loading module hook 'hook-PyQt5.QtMultimedia.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40164 INFO: Loading module hook 'hook-packaging.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40165 INFO: Loading module hook 'hook-pickle.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40187 INFO: Loading module hook 'hook-heapq.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40192 INFO: Loading module hook 'hook-difflib.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40196 INFO: Loading module hook 'hook-PyQt5.QtWidgets.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40361 INFO: Loading module hook 'hook-multiprocessing.util.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40382 INFO: Loading module hook 'hook-sysconfig.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40421 INFO: Loading module hook 'hook-PyQt5.QtNetwork.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40545 INFO: Loading module hook 'hook-xml.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40691 INFO: Loading module hook 'hook-distutils.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40692 INFO: Loading module hook 'hook-PyQt5.QtCore.py' from '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks'...
40903 INFO: Looking for ctypes DLLs
40987 WARNING: Library Cfgmgr32 required via ctypes not found
40992 WARNING: Library setupapi required via ctypes not found
40994 WARNING: Library Advapi32 required via ctypes not found
40996 WARNING: Ignoring /System/Library/Frameworks/IOKit.framework/IOKit imported from /Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/serial/tools/list_ports_osx.py - only basenames are supported with ctypes imports!
40996 WARNING: Ignoring /System/Library/Frameworks/CoreFoundation.framework/CoreFoundation imported from /Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/serial/tools/list_ports_osx.py - only basenames are supported with ctypes imports!
41028 INFO: Analyzing run-time hooks ...
41041 INFO: Including run-time hook '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks/rthooks/pyi_rth_pyqt5.py'
41043 INFO: Including run-time hook '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks/rthooks/pyi_rth_pkgutil.py'
41047 INFO: Including run-time hook '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks/rthooks/pyi_rth_inspect.py'
41049 INFO: Including run-time hook '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks/rthooks/pyi_rth_subprocess.py'
41051 INFO: Including run-time hook '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks/rthooks/pyi_rth_multiprocessing.py'
41055 INFO: Including run-time hook '/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/hooks/rthooks/pyi_rth_pkgres.py'
41140 INFO: Looking for dynamic libraries
719 INFO: gettext setting initial language to None
Traceback (most recent call last):
  File "/Users/vagrant/electrum/contrib/osx/build-venv/bin/pyinstaller", line 8, in <module>
    sys.exit(run())
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/__main__.py", line 178, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/__main__.py", line 59, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 934, in main
    build(specfile, distpath, workpath, clean_build)
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 856, in build
    exec(code, spec_namespace)
  File "contrib/osx/osx.spec", line 48, in <module>
    a = Analysis([electrum+ MAIN_SCRIPT,
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 381, in __init__
    self.__postinit__()
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/building/datastruct.py", line 173, in __postinit__
    self.assemble()
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 660, in assemble
    isolated.call(find_binary_dependencies, list(self.binaries), self.binding_redirects, collected_packages)
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/isolated/_parent.py", line 238, in call
    return isolated.call(function, *args, **kwargs)
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/isolated/_parent.py", line 176, in call
    raise RuntimeError(f"Child process call to {function.__name__}() failed with:\n" + output)
RuntimeError: Child process call to find_binary_dependencies() failed with:
  File "/Users/vagrant/electrum/electrum/gui/qml/__init__.py", line 8, in <module>
    import PyQt6
ModuleNotFoundError: No module named 'PyQt6'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/isolated/_child.py", line 63, in run_next_command
    output = function(*args, **kwargs)
  File "/Users/vagrant/electrum/contrib/osx/build-venv/lib/python3.10/site-packages/PyInstaller/building/build_main.py", line 157, in find_binary_dependencies
    __import__(package)
  File "/Users/vagrant/electrum/electrum/gui/qml/__init__.py", line 10, in <module>
    sys.exit("Error: Could not import PyQt6. On Linux systems, you may try 'sudo apt-get install python3-pyqt6'")
SystemExit: Error: Could not import PyQt6. On Linux systems, you may try 'sudo apt-get install python3-pyqt6'
🗯 ERROR: Could not build binary
```
2023-11-30 13:43:57 +00:00
Sander van Grieken
90d1d587e8 network: async tor probe 2023-11-30 14:32:19 +01:00
Sander van Grieken
26b5bec5af qml: small text change in proxy settings 2023-11-30 14:27:31 +01:00
Sander van Grieken
7b96a83350 wallet: add sighash check to class Abstract_Wallet
qml: use backend sighash check and add user confirmation path
qt: use backend sighash check and add user confirmation path
qml: include get_warning_for_risk_of_burning_coins_as_fees test in txdetails
qt: add warning icon to sighash warning
add sighash and fee checks to wallet.sign_transaction, making all warnings fatal unless ignore_warnings is set to True
tests: test sign_transaction on both code paths with ignore_warnings True and False,
raise specific exceptions TransactionPotentiallyDangerousException and TransactionDangerousException
2023-11-30 12:53:46 +01:00
Sander van Grieken
ae9767880e ui: add icons for script type and deterministic wallet 2023-11-27 16:14:41 +01:00
SomberNight
b18f9570fc qml wizard: fix creating imported wallet from camera: concat with space
The parser expects the list of keys/addrs to be whitespace-separated (no commas).
Same as line 61.
2023-11-24 20:48:04 +00:00
Sander van Grieken
6f9e86a1ac qml: fix wrong year near newyear in transaction list 2023-11-24 10:54:25 +01:00
SomberNight
9f1b8613d0 swaps: code style clean-up, add type hints, force kwargs
no intended functional changes
2023-11-22 17:50:29 +00:00
SomberNight
7f64ecc4bd wallet.bump_fee: the glorious return of BumpFeeStrategy :D
gui/qt/rbf_dialog.py (old) lines 57-64 were implementing logic that should not be part of GUI code.
Case in point, gui/qml/qetxfinalizer.py (old) lines 511-513 duplicated half of that logic but not the other half.
That logic is now moved to wallet.get_bumpfee_strategies_for_tx().

More context: a user on irc got confused when using the qml gui. They were sending "max" and wanted to bump_fee.
The qml gui selected the "preserve_payment" strategy by default, using which there was no solution, and the user
did not notice that the strategy can be altered (via the "method" dropdown). The qt gui had logic to select
"decrease_payment" by default in such a case (which does find a solution to bump) but this logic was not
duplicated in the qml gui.
Instead of duplicating the logic, this commit moves it to shared lib code.
2023-11-20 18:55:43 +00:00
Sander van Grieken
03dd38bfb8 qml: add support for ln address and openalias, fix lnurl finalize step,
avoid overloading invoiceParser with new payment identifiers while potentially long-running
resolve/finalize steps are ongoing, show errors inresolve/finalize steps to user.
2023-11-20 17:16:22 +01:00
Sander van Grieken
ff77013a82 qml: check if self._orig_tx is valid. fixes #8407 2023-11-20 17:13:23 +01:00
Sander van Grieken
b098be988e qml: show channel close tx(id) in ChannelDetails 2023-11-20 12:58:48 +01:00
Sander van Grieken
a57a0d001b qml: make TextAreas more visible 2023-11-15 18:42:11 +01:00
Sander van Grieken
f8eb2e8cf8 qml: resize menus according to content 2023-11-15 17:35:08 +01:00
Sander van Grieken
4ab973f93d followup 3793a6b6b6, remove leftovers 2023-11-14 17:22:05 +01:00
Sander van Grieken
3793a6b6b6 qml: use highlight pane for QR codes, refactor ReceiveDialog invoice select UI. 2023-11-14 17:19:27 +01:00
Sander van Grieken
86a45c668c few small fixes 2023-11-14 14:36:54 +01:00
Sander van Grieken
94b1df4a08 qml: small UI fix, wording. 2023-11-13 11:35:30 +01:00
ThomasV
4a3a61c6b0 Merge pull request #8678 from accumulator/qml_password_strength
qml: introduce PasswordStrengthIndicator control, and add to Password…
2023-11-11 09:52:52 +01:00
Sander van Grieken
d1d4e19554 qml: txdetails: add lockDelay property when height is TX_HEIGHT_FUTURE and add mempool depth for height TX_HEIGHT_UNCONF_PARENT 2023-11-10 17:03:56 +01:00
ThomasV
de0dc93a9d Merge pull request #8675 from accumulator/address_delete
qml: implement delete address for imported wallets
2023-11-10 15:23:29 +01:00
ThomasV
4252c30210 Merge pull request #8682 from accumulator/about_version
qml: remove APK version, add Qt and PyQt version strings to About page
2023-11-10 15:04:53 +01:00
Sander van Grieken
3967323842 qml: refactor ChannelDetails. Add funding outpoint 2023-11-10 13:02:55 +01:00
Sander van Grieken
2995bc8b37 qml: fix dialog not closing if dialog is shown/hidden more than once
most dialogs are destroyed when closed, therefore not hitting this bug,
but e.g. ChannelOpenProgressDialog is reused.
2023-11-10 11:59:22 +01:00
Sander van Grieken
42f323ac8d qml: remove APK version, add Qt and PyQt version strings to About page 2023-11-10 11:11:51 +01:00
Sander van Grieken
0fb47c87d2 qml: fixes for CloseChannelDialog;
- split RequestForceClose and LocalForceClose options, as request force close is only available if connected.
- disable no close policy on dialog, as it locks the user in the dialog if no succesful close is initiated.
  what this intended to do is keep the backing object QEChannelDetails alive until a result is obtained, to avoid
  exceptions when emitting the result signal. this is now handled more robustly, the user can leave the dialog
  without triggering exceptions later.
2023-11-10 10:58:08 +01:00
Sander van Grieken
e011bd235b qml: implement delete address for imported wallets, and fix address list on address/key add. 2023-11-10 09:30:56 +01:00
Sander van Grieken
98264f64ad qml: introduce PasswordStrengthIndicator control, and add to PasswordDialog and WCWalletPassword 2023-11-10 09:30:31 +01:00
SomberNight
5ba156fcad Merge remote-tracking branch 'remotes/accumulator/qt6'
For the "qml" gui (used on Android), this upgrades the qt version from 5.15 to 6.4.

PR https://github.com/spesmilo/electrum/pull/8545
2023-11-09 16:18:56 +00:00
Sander van Grieken
047cc6f957 qml: remove attempt to unfocus by clicking dialog background
Doesn't really work as it triggers on events above the background it is defined on :(
2023-11-08 15:38:26 +01:00
Sander van Grieken
8798a45d70 qml: fix issue with width of fiat textedit on ReceiveDetailsDialog 2023-11-07 17:05:13 +01:00
Sander van Grieken
a6432732f0 qml: addresses/coins filter match case insensitive, don't match 'None' for undefined fields 2023-11-07 10:47:34 +01:00
SomberNight
1544a71542 qml qr scanner: make xml layout look nicer 2023-11-07 10:32:14 +01:00