1
0
Commit Graph

19605 Commits

Author SHA1 Message Date
f321x
04b7b683ed qml: add close no-op to QEQRScanner to fix type error
Adds close() no-op method to QEQRScanner to prevent type errors like
this:
```
01-02 17:28:09.645 10543 10565 I python  : 162.27 | W | gui.qml.qeapp | file:///data/data/org.electrum.electrum/files/app/electrum/gui/qml/components/SweepDialog.qml:123: TypeError: Property 'close' of object QEQRScanner(0xdd32f66fb600)
is not a function
```
2026-01-08 11:14:06 +01:00
SomberNight
2172dadf62 hw plugins: coldcard: fix compat with ckcc-protocol v1.5.0
fixes https://github.com/spesmilo/electrum/issues/10386
2026-01-05 16:28:23 +00:00
SomberNight
f1f4fc0939 hw plugins: coldcard: log error when I forget to set udev rules
so that next time I check that before changing cables, usb hubs, and VMs o.O
2026-01-05 16:06:24 +00:00
ghost43
3bd5f1a681 Merge pull request #10372 from SomberNight/202512_lnworker_split
lnworker: split LNWallet and LNWorker: LNWallet "has an" LNWorker
2026-01-05 15:58:30 +00:00
SomberNight
927724145a tests: rm some more dead code 2026-01-05 15:56:13 +00:00
SomberNight
0afd433c42 tests: properly clean-up MockLNWallets after tests finish 2026-01-05 15:56:10 +00:00
SomberNight
c3e373a3b2 lnchannel: chan.lnworker must now always be set, even in unit tests 2026-01-05 15:56:07 +00:00
SomberNight
dfeb9918d8 tests: lnchannel: rewrite create_test_channels to use LNWallet 2026-01-05 15:56:04 +00:00
SomberNight
17f41044d5 tests: lnpeer: fix cyclic lnworker.wallet.lnworker inconsistency
These better hold, lol:
wallet.lnworker.wallet == wallet
lnworker.wallet.lnworker == lnworker
2026-01-05 15:56:01 +00:00
SomberNight
ea42b02ceb tests: simplify MockLNWallet, add fixme for cyclic inconsistency 2026-01-05 15:55:58 +00:00
SomberNight
91b98240dc tests: lnpeer: follow-up prev: rm horrible ugly hack 2026-01-05 15:55:54 +00:00
SomberNight
ec65c53de3 tests: lnpeer: mostly unify prepare_peers and prepare_graph 2026-01-05 15:55:51 +00:00
SomberNight
024f9b988d tests: lnpeer: (move-only) towards unifying prepare_{peers,graph} 2026-01-05 15:55:48 +00:00
SomberNight
17b7974800 tests: lnpeer: simplify tx_queue 2026-01-05 15:55:45 +00:00
SomberNight
b292c027c3 lnpeer: move make_local_config to LNWallet
no functional changes
2026-01-05 15:55:41 +00:00
SomberNight
1006e8092f lnworker: split LNWallet and LNWorker: LNWallet "has an" LNWorker
- LNWallet no longer "is-an" LNWorker, instead LNWallet "has-an" LNWorker
- the motivation is to make the unit tests nicer, and allow writing unit tests for more things
  - I hope this makes it possible to e.g. test lnsweep in the unit tests
  - some stuff we would previously have to write a regtest for, maybe we can write a unit test for, now
- in unit tests, MockLNWallet now
  - inherits LNWallet
  - the Wallet is no longer being mocked
2026-01-05 15:55:31 +00:00
ghost43
bdcd3f9c7c Merge pull request #10364 from f321x/test_dont_settle_htlcs_forwarding
lnpeer/lnworker: check dont_settle_htlcs when forwarding
2025-12-30 16:13:16 +00:00
ghost43
9d94a8b66d Merge pull request #10388 from SomberNight/202512_android_py311
android build: bump python version (3.10.18->3.11.14)
2025-12-30 15:54:15 +00:00
SomberNight
adb4f6f246 android build: bump python version (3.10.18->3.11.14)
Bump the python version used on Android from 3.10 to 3.11.
The substance is the backport of the corresponding commit [0] from upstream p4a.

Tested that apk is still reproducible by doing two full builds.
I also used the apk a bit and it seems to work at runtime. :)

[0]: 78db83223f  (which got squashed into 83e74cac0f)
2025-12-27 03:31:19 +00:00
ghost43
ca410beae1 Merge pull request #10385 from f321x/bump_zxingcpp
android: bump barcodescannerview, allow tap to focus, rm 16kb patch
2025-12-22 18:27:44 +00:00
ghost43
a50f963a61 Merge pull request #10373 from accumulator/qml_helpdialog_styling
qml: improve HelpDialog styling
2025-12-22 17:29:57 +00:00
ghost43
261561ad0b Merge pull request #10384 from f321x/pi_handling_lightning_prefix
pi: fix incorrectly parsing emaillike with 'ln' prefix as bech32 ln pi
2025-12-22 17:13:12 +00:00
f321x
dd1d98e37c pi: allow emaillike pi with 'lightning:' prefix
Lightning addresses with 'lightning:' do occur in the wild and make
sense (how else would e.g. the smartphone know to open a lightning
wallet instead of the e-mail client). So we should allow this.
2025-12-22 18:06:26 +01:00
f321x
2cd1de4f21 pi: fix incorrectly parsing emaillike with 'ln' prefix
Fixes a bug where we incorrectly parsed emaillike payment identifiers as
bech32 lightning payment identifier if they start with a 'ln' prefix.
2025-12-22 18:06:17 +01:00
ghost43
ec7a5906f4 Merge pull request #10366 from f321x/fix_tc_submarine_payment
qt: minor improvements and bugfix
2025-12-22 16:43:20 +00:00
f321x
d1368db313 android: qr scanner: allow tap to focus
Allow tap to focus in the android qr scanner as some devices don't
support autofocus. This should allow them to focus on some qr code.
2025-12-22 15:02:01 +01:00
f321x
e09794c232 android: bump barcode scanner version
Bumps the BarcodeScannerView and zxing++ version which allows us to
remove the 16kb page alignment patch as this is now done upstream.
Ref 87d82f38c5
2025-12-22 14:44:32 +01:00
f321x
82c006e0e4 qt: Submarine Payments: update tab on_channels_updated
Updates the submarine payments tab if the channels get updated so the
user isn't stuck with a liquidity warning if they open the tab before
the channels are initialized (e.g. on wallet startup).
2025-12-22 14:08:08 +01:00
f321x
d233e4ffa8 qt: Add help button to submarine payments tab
Adds a help button with explanation to the submarine payments tab.
2025-12-22 14:08:01 +01:00
f321x
4c44620d4d qt: ConfirmTxDialog: also show Tools text
Also show the `Tools` text besides the preferences icon so it looks
equal to the main window.
Originally this was a followup part of #10300 which got closed
due to other reasons.
2025-12-22 11:02:17 +01:00
f321x
db45606288 qt: disable ln configs in ConfirmTxDialog if no ln
Disables the lightning related config options in the ConfirmTxDialog
tools and shows an according tooltip if lightning is not available in
the wallet. This should prevent confusion of users.
2025-12-22 11:02:15 +01:00
f321x
93d85a0b0e qt: disable Submarine Payment tab if not swap_manager
Disable the `Submarine Payments` tab if the swap_manager is None (the
wallet has no lightning support).
2025-12-22 11:02:13 +01:00
f321x
71bc9af511 qt: channels_list: add tooltip to New Channel btn
Adds tooltips to the "New Channel" button so users understand why it is
disabled and what it does when it is enabled.
2025-12-22 11:02:12 +01:00
ghost43
81a288a1f9 Merge pull request #10382 from f321x/fix_exc_in_htlc_switch
lnpeer: fix callback exception handling, fix type hint
2025-12-19 15:42:15 +00:00
f321x
14977e4cee lnpeer: fix callback type hint
asyncio.create_task expects a Coroutine, not all Awaitables are
Coroutines.
2025-12-19 16:37:23 +01:00
f321x
ff61596598 lnpeer: fix callback exception handler
The done_callback for the callback tasks in _run_htlc_switch_iteration
tried to access mpp_sets by key but they might already have been deleted
when the callback is called, causing an KeyError. Instead forward the
exceptions to the crash reporter so we get notice of them and they get
logged correctly.

```
20251219T131356.946565Z |    ERROR | asyncio | Exception in callback Peer._run_htlc_switch_iteration.<locals>.<lambda>(<Task finishe.../util.py:1773>) at /home/user/code/electrum-fork/electrum/lnpeer.py:2907
handle: <Handle Peer._run_htlc_switch_iteration.<locals>.<lambda>(<Task finishe.../util.py:1773>) at /home/user/code/electrum-fork/electrum/lnpeer.py:2907 created at /usr/lib64/python3.14/asyncio/events.py:94>
source_traceback: Object created at (most recent call last):
  File "/usr/lib64/python3.14/threading.py", line 1082, in _bootstrap_inner
    self._context.run(self.run)
  File "/home/user/code/electrum-fork/electrum/util.py", line 1145, in run_with_except_hook
    run_original(*args2, **kwargs2)
  File "/usr/lib64/python3.14/threading.py", line 1024, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/code/electrum-fork/electrum/util.py", line 1705, in run_event_loop
    loop.run_until_complete(stopping_fut)
  File "/usr/lib64/python3.14/asyncio/base_events.py", line 706, in run_until_complete
    self.run_forever()
  File "/usr/lib64/python3.14/asyncio/base_events.py", line 677, in run_forever
    self._run_once()
  File "/usr/lib64/python3.14/asyncio/base_events.py", line 2038, in _run_once
    handle._run()
  File "/usr/lib64/python3.14/asyncio/events.py", line 94, in _run
    self._context.run(self._callback, *self._args)
Traceback (most recent call last):
  File "/usr/lib64/python3.14/asyncio/events.py", line 94, in _run
    self._context.run(self._callback, *self._args)
    ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/code/electrum-fork/electrum/lnpeer.py", line 2909, in <lambda>
    f"{self.lnworker.received_mpp_htlcs[pk]=}", exc_info=t.exception()) if t.exception() else None
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
KeyError: '0000980000010001:1'
```
2025-12-19 16:37:15 +01:00
SomberNight
08f101a7e5 tests: lnpeer/onion_msg: rm dead code 2025-12-19 14:53:28 +00:00
ghost43
a2088137d4 Merge pull request #10381 from f321x/donation_address_remove_prefix
interface: remove prefix from donation addresses
2025-12-19 12:47:15 +00:00
f321x
c56c27966a interface: remove prefix from donation addresses
Some servers seem to serve their donation address with `bitcoin:`
prefix, preventing them from getting donations. This removes the prefix.

E.g.:
```
262.63 | I | interface.[2ex.digitaleveryware.com:50002] | invalid donation address from server: 'bitcoin:bc1q0q6lcajak7r8h8c8luzp0zj35v0usqd4pdzqjg'
```
2025-12-19 13:42:17 +01:00
ghost43
844a3143d4 Merge pull request #10378 from SomberNight/202512_network_gui_disconnected_servers
network gui: always show bookmarked servers in list
2025-12-19 12:26:09 +00:00
ThomasV
2529911df9 Merge pull request #10379 from SomberNight/202512_lnpeer_cleanup_anchors
LNWallet: require OPTION_CHANNEL_TYPE
2025-12-18 19:26:57 +01:00
ThomasV
baf877252d Merge pull request #10345 from f321x/enforce_unified_password_qml_button
qml: limit creation of new wallets to existing password
2025-12-18 19:25:04 +01:00
f321x
91b3a4a5dc daemon: reset CURRENT_WALLET if the wallet gets deleted
Set SimpleConfig.CURRENT_WALLET = None if the wallet gets deleted,
otherwise we try to open it on the next startup which will show an error
message in QML.
2025-12-18 17:54:56 +01:00
f321x
6bb8afebe5 qml: fix incorrect index when deleting wallet
QEWalletListModel.remove_wallet was calling beginRemoveRows with i
instead of remove as index, causing it to not delete the wallet from the
list and the wallet list becoming broken after deleting a wallet.
2025-12-18 17:54:54 +01:00
f321x
aee0f8fb54 qml: OpenWalletDialog: load any wallet if password matches
If the user has wallets with different passwords (non-unified pw) and
enters a password on startup that fails to unlock the recently used
wallet this change will automatically open any other wallet if there
is another wallet that can be unlocked with this password.
2025-12-18 17:54:52 +01:00
f321x
ba379b7da4 qml: LoadingWalletDialog: fix ressource leak
When closing the OpenWalletDialog without unlocking a wallet the
LoadingWalletDialog wouldn't get properly cleaned up as the
LoadingWalletDialog.visible was never set true. This causes the
connections to accumulate and the callbacks won't get unregistered after
closing the LoadingWalletDialog again.
2025-12-18 17:54:51 +01:00
f321x
70084750ef qml: show wallet list as root if no wallet is loaded
Shows Wallets.qml as root if no wallet is loaded and removes the logic
for no loaded wallet from the WalletMainView as WalletMainView won't be
shown anymore without a Daemon.currentWallet.
2025-12-18 17:54:28 +01:00
SomberNight
aab22a237b ln: require LnFeatures.OPTION_CHANNEL_TYPE as bolts now mandate it
This simplifies some code.

following 9d456b1c4a
2025-12-18 16:43:19 +00:00
SomberNight
85a45f9b1f lnutil: rm remnants of old unsupported original ANCHOR_OUTPUTS option 2025-12-18 16:09:49 +00:00
accumulator
519944c06e Merge pull request #10377 from accumulator/qml_process_request_status_update_via_eventloop
qml: QERequestDetails process request update via event loop.
2025-12-18 16:48:40 +01:00