1
0
Commit Graph

19026 Commits

Author SHA1 Message Date
SomberNight
a94deedc26 android build: rm blacklist.txt
this looks like broken dead code

- the "if" body is never entered as `.buildozer/` gets created by `contrib/android/build.sh`
    8eb3c43603/contrib/android/build.sh (L32)
- `blacklist.txt` is at `contrib/android/blacklist.txt` but the Makefile expects it at the root
    ref https://gitlab.com/fdroid/fdroiddata/-/merge_requests/24948#note_2643399062
- `blacklist.txt` is not referenced anywhere else
2025-07-22 18:05:46 +00:00
ghost43
8eb3c43603 Merge pull request #10059 from f321x/fix_issue_10057
fix: cli: check_hold_invoice showing settled invoice as unpaid
2025-07-21 15:53:54 +00:00
ghost43
a391c3661c Merge pull request #10066 from f321x/fix_make_barcode_scanner_log_vars
fix: log correct var in make_barcode_scanner script
2025-07-21 14:38:48 +00:00
f321x
5298e29a36 fix: log correct var in make_barcode_scanner script
Fixes two log lines to use the correct path variable.
2025-07-21 16:28:00 +02:00
ghost43
43ae7e6df8 Merge pull request #10052 from SomberNight/202507_qt_crash_felix_2
crash reporter: rm `Never`, add confirm to `Send`, and only show window once per exc group
2025-07-21 13:50:35 +00:00
SomberNight
729003e557 wizard: move hw_unlock to base cls, and add test_wizard unlock_hw test 2025-07-21 03:33:43 +00:00
SomberNight
b0464cc934 refactor 'init_wallet_wizard' hook a bit. add test_wizard trezor test 2025-07-21 02:40:17 +00:00
SomberNight
358728b316 qt wizard: don't log xpub of hw cosigner 2025-07-21 02:21:40 +00:00
SomberNight
7675182a34 tests: test_wizard: dedupe wallet_name 2025-07-21 00:29:56 +00:00
SomberNight
a4c8cf2e4f tests: test_wizard: add 2fa_haveseed_disable2FA case 2025-07-21 00:18:40 +00:00
SomberNight
e0d67524a1 tests: test_wizard: set wallet password and yes/no encrypt file 2025-07-21 00:07:23 +00:00
SomberNight
05d9aca8aa test_wizard: now that I ctrl+c, ctrl+v-ed lots of code, patterns emerge 2025-07-20 23:43:24 +00:00
SomberNight
2bb7500e29 test: test_wizard: add 2fa_createseed case 2025-07-20 23:34:57 +00:00
SomberNight
a3dde40c69 test: test_wizard: add "old" electrum seed tests, and bip39+seed_ext 2025-07-20 23:26:09 +00:00
SomberNight
522810d5bd test: test_wizard: duplicate test_2fa, one for passphrase, one without 2025-07-20 22:24:06 +00:00
SomberNight
bfd3c0e48c Merge branch spesmilo/pr/10016' into 202507_pr10016_qml_wizard_passphrase 2025-07-20 22:02:01 +00:00
SomberNight
e56bc4f2ae tests: test_wizard: add final check: try loading created wallet file 2025-07-20 21:41:44 +00:00
SomberNight
01a1eacdb9 rework electrum-env script
- remove all PYTHONPATH-mangling as it keeps subtly not working on different systems
  - its main usecase was to use the apt installed pyqt, but I don't think that's worth the hassle
- instead now all dependencies are installed in the venv via pip
  - well, except for libsecp
- instead of installing unversioned latest deps at venv-creation-time, and then keep using those forever
  - the script now installs pinned deps, and detects updates to the pins and installs them again if they changed

closes https://github.com/spesmilo/electrum/pull/10018
2025-07-20 16:53:38 +00:00
Felix
b4de29e692 Add invoice_amount_sat to check_hold_invoice response
Adds an additional value to the `check_hold_invoice` cli command: `invoice_amount_sat` which returns the requested amount value of the hold invoice.

Co-authored-by: ghost43 <somber.night@protonmail.com>
2025-07-20 18:14:59 +02:00
ghost43
4616d4f135 Merge pull request #10060 from f321x/fix_issue_10053
qt: NewChannelDialog: do some validation before enabling Ok button
2025-07-20 16:03:30 +00:00
f321x
225ff4aba6 qt: NewChannelDialog: do some pre-validation for Ok button
Do some validation if the user input in `NewChannelDialog` before
allowing to click the `Ok` button. This is done to make the UI a bit
more intuitive and prevent issues like #10053 in which the user was able
to click `Ok` with a empty trampoline node list which raised an
`IndexError` (probably on testnet4).
2025-07-20 15:09:38 +02:00
f321x
8f9951ebed fix: cli: check_hold_invoice showing settled invoice as unpaid
the cli command `check_hold_invoice` incorrectly assumes that
`lnworker.is_accepted_mpp(payment_hash)` is true for settled invoices,
however it is not as the received mpp entries will be removed from
the `lnworker.received_mpp_htlcs` shortly after adding the preimage to
lnworker (after the htlcs got removed from the channel).

Also renames `amount_sat` in the `check_hold_invoice` response to
`amount_sat_received` to make it more obvious that this is the currently
received amount instead of the amount the invoice of `payment_hash` has
been created with.
2025-07-20 13:23:06 +02:00
SomberNight
ba07ca3ab9 config: add description to LIGHTNING_LISTEN configvar 2025-07-19 22:34:15 +00:00
SomberNight
c85272b546 crash reporter: only show reporter once per exception groupid
- don't show crash reporter multiple times for the "same" exception
  - at least until the user restart the program (there is no persistence)
- this is a ~replacement for the removed "Never show crash reporter" option
- in case there e.g. a thread with timer spamming an exception erroneously,
  this ensures we only offer to send the crash report once (per process lifecycle)
2025-07-18 16:44:15 +00:00
SomberNight
0e0e47c3c5 base_crash_reporter: change get_traceback_info to classmethod 2025-07-18 16:44:12 +00:00
SomberNight
970f84151d crash reporter: remove "Never" btn and config.SHOW_CRASH_REPORTER opt
- always hook into sys.excepthook and show the crash reporter
- if we don't hook into sys.excepthook and an exception propagates out on a Qt thread,
  that kills the Qt GUI
  - ref https://github.com/spesmilo/electrum/pull/10049#issuecomment-3089278083
2025-07-18 16:44:08 +00:00
SomberNight
2ed691b8f0 crash reporter: add popup asking to confirm to send_report 2025-07-18 16:44:05 +00:00
SomberNight
627f5a88b3 qml: ExceptionDialog: feedback from sendReport needs even higher z
follow-up 1559129016
2025-07-18 15:26:08 +00:00
SomberNight
eef562389c qml: qenetwork: fix type confusion for "server"
exc triggered when switching from same server to same server:
```
  9.43 | D | gui.qml.qenetwork | server_status updated: Connecting
  9.43 | E | network | Exception in _run_new_interface: Exception('diagnostic name not yet available?')
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/logging.py", line 241, in __get_logger_for_obj
    diag_name = self.diagnostic_name()
  File "/home/user/wspace/electrum/electrum/interface.py", line 555, in diagnostic_name
    return self.server.net_addr_str()
AttributeError: 'str' object has no attribute 'net_addr_str'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/util.py", line 1218, in wrapper
    return await func(*args, **kwargs)
  File "/home/user/wspace/electrum/electrum/network.py", line 986, in _run_new_interface
    interface = Interface(network=self, server=server)
  File "/home/user/wspace/electrum/electrum/interface.py", line 502, in __init__
    Logger.__init__(self)
  File "/home/user/wspace/electrum/electrum/logging.py", line 232, in __init__
    self.logger = self.__get_logger_for_obj()
  File "/home/user/wspace/electrum/electrum/logging.py", line 243, in __get_logger_for_obj
    raise Exception("diagnostic name not yet available?") from e
Exception: diagnostic name not yet available?
```
2025-07-18 14:16:30 +00:00
ghost43
159d83905b Merge pull request #10049 from f321x/fix_show_transaction_user_cancelled
fix: handle UserCancelled in show_transaction
2025-07-18 12:06:02 +00:00
ghost43
ba68fb6e12 Merge pull request #10048 from f321x/fix_new_channel_exception
fix: qt: exception when clicking "New Channel"
2025-07-18 11:53:29 +00:00
SomberNight
463e447439 wallet.can_have_lightning: more explicit impl
Watching-only wallets can have a keystore.
It was actually keystore.may_have_password() that was filtering them out but that was not really obvious.
Better to be explicit I think.
2025-07-18 11:49:50 +00:00
ghost43
6feba10170 Merge pull request #10045 from f321x/fix_swap_update_relays
fix: NostrTransport.update_relays() KeyError
2025-07-18 11:29:05 +00:00
f321x
39bcdec584 fix: handle UserCancelled in show_transaction
`TxDialog` may has to fetch tx information from the network on
construction (`self.set_tx()`) and is showing a `RunCoroutineDialog`.
If the user cancels this dialog the `UserCancelled` exception is not
caught in `show_transaction()` and can even lead to Electrum crashing.
Fixes #10041
2025-07-18 13:14:27 +02:00
f321x
1b325394ba fix: exception when clicking "New Channel"
Fixes exception occuring when `wallet.lnworker` is `None` and the user
clicks on `New Channel` in the channels list tab. The `New Channel`
button is enabled when the wallet *can* have lightning, not the wallet
actually having lightning enabled.
With this patch the `init_lightning_dialog` will show up if the user
clicks on `New Channel` but lightning is not yet enabled.
I noticed this by restoring from a funded vpub and then
loading the keystore from seed afterwards.
2025-07-18 11:12:25 +02:00
f321x
dd41e87295 fix: NostrTransport.update_relays() KeyError
`NostrTransport.update_relays()` raises a `KeyError` when the offer of
the configured swapserver (`config.SWAPSERVER_NPUB`) is not in
`self._offers` even though `sm.pairs_updated` gets triggered. This
happens because `NostrTransport.get_pairs()` called `sm.update_pairs()`
before adding the received offer to `self._offers`.
2025-07-18 10:17:12 +02:00
SomberNight
23adf13070 qml: fix doNotify for Windows. lol
```
319.55 | E | gui.qml.qeapp.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\electrum\util.py", line 1130, in run_with_except_hook
    run_original(*args2, **kwargs2)
  File "...\Python310\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "...\plyer\platforms\win\libs\balloontip.py", line 206, in balloon_tip
    WindowsBalloonTip(**kwargs)
  File "...\plyer\platforms\win\libs\balloontip.py", line 130, in __init__
    raise Exception('Could not load icon {}'.format(app_icon))
Exception: Could not load icon ...\electrum\electrum\gui\icons\electrum.png
```
2025-07-18 01:37:07 +00:00
SomberNight
e658fa4e04 qml: QETxFinalizer: handle txid being None
fixes https://github.com/spesmilo/electrum/issues/10042
2025-07-18 01:11:19 +00:00
ghost43
8770c97c4f Merge pull request #10040 from benma/bitbox02-7.0.0
bitbox02: update to 7.0.0
2025-07-17 12:08:58 +00:00
SomberNight
52f67b50dc build: update pinned bitbox02 (partial rerun freeze_packages) 2025-07-17 12:08:02 +00:00
Marko Bencun
6567e01f61 bitbox02: update to 7.0.0
This adds support for BitBox02 Nova devices.
2025-07-17 12:07:24 +02:00
ThomasV
244a4c5053 update date for 4.6.0 4.6.0 2025-07-16 14:50:11 +02:00
ghost43
c3b9ef0c89 Merge pull request #10034 from f321x/fix_confirm_tx_dialog_timer_exc
fix: qt: handle main_window.gui_object.timer being None
2025-07-16 12:17:24 +00:00
Sander van Grieken
0e055f8127 qt: don't share ElectrumGui.QTimer, use self-contained QTimer so its lifecycle is synced in
`ElectrumWindow`, `TxEditor`, `SwapDialog`

Also use `QTimer` classmethod for `.singleShot()` occurrences.
2025-07-16 13:13:26 +02:00
accumulator
371c1bd1e3 Merge pull request #10036 from accumulator/fix_10035
qml: fix passphrase/seed extension wordwrap
2025-07-16 13:06:44 +02:00
Sander van Grieken
b9ea17674d qml: fix passphrase/seed extension wordwrap 2025-07-16 13:05:44 +02:00
ghost43
b259aab727 Merge pull request #10032 from SomberNight/202507_qt_confirm_txdialog_fee
qt ConfirmTxDialog: also save custom fixed feerate fee_policies
2025-07-16 10:47:28 +00:00
f321x
121b7b767e fix: qt: handle main_window.gui_object.timer being None
When closing Electrum with open `ConfirmTxDialog` the following
exception is raised:

```
1319.20 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "/home/user/code/electrum-fork/electrum/gui/qt/send_tab.py", line 575, in do_pay_or_get_invoice
    self.do_pay_invoice(self.pending_invoice)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/code/electrum-fork/electrum/gui/qt/send_tab.py", line 602, in do_pay_invoice
    self.pay_onchain_dialog(invoice.outputs, invoice=invoice)
    ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/code/electrum-fork/electrum/gui/qt/send_tab.py", line 328, in pay_onchain_dialog
    tx, is_preview = self.window.confirm_tx_dialog(make_tx, output_value, batching_candidates=candidates)
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/code/electrum-fork/electrum/gui/qt/main_window.py", line 1502, in confirm_tx_dialog
    return d.run(), d.is_preview
           ~~~~~^^
  File "/home/user/code/electrum-fork/electrum/gui/qt/confirm_tx_dialog.py", line 477, in run
    self.stop_editor_updates()
    ~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/user/code/electrum-fork/electrum/gui/qt/confirm_tx_dialog.py", line 133, in stop_editor_updates
    self.main_window.gui_object.timer.timeout.disconnect(self.timer_actions)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'timeout'
```

This can be prevented by checking if `main_window.gui_object.timer` is
None before trying to disconnect it.
2025-07-16 09:47:32 +02:00
SomberNight
5fad4bff8f verifier: fix off-by-one for max_checkpoint
if a wallet had a tx mined in the max_checkpoint block, in certain cases
we would leave it forever in the "unverified" state and remain stuck in "synchronizing..."
2025-07-15 22:35:21 +00:00
SomberNight
76005372a6 qt ConfirmTxDialog: only show fee_target text if slider is active 2025-07-15 16:52:11 +00:00