Commit Graph

19742 Commits

Author SHA1 Message Date
ThomasV 952737594b announcement_signatures: add more early returns 2026-02-17 08:57:49 +01:00
ghost43 a6f4a25f57 Merge pull request #10482 from Sanksari12/master
Remove non-existing electrum server on owner's request
2026-02-17 06:58:17 +00:00
Sanksari12 67f3fcfb16 Update servers.json
Remove lavahost.org from servers.json as the host does not host a public electrum instance.
2026-02-16 19:47:42 +00:00
SomberNight cf072f6ece contrib/locale/push_locale: trivial follow-up: write vs writelines
kinda wild that writelines worked there too, that's what we get for dynamic typing... :)

follow-up https://github.com/spesmilo/electrum/commit/d20c9364efb01a513e14b5eb9195f51b9919c695
2026-02-16 17:29:24 +00:00
SomberNight 4c597ffb5a follow-up prev: satisfy ban_unicode.py 2026-02-14 10:10:59 +00:00
SomberNight 1fc8804791 locale: don't translate names of languages
note this is just a conceptual change, in practice it is a no-op:
i18n.py global scope is executed much earlier than the language gets set.
see https://github.com/spesmilo/electrum/blob/61a6ab1d95e6faccce45ed008426283430fa99d4/run_electrum#L422
2026-02-14 10:03:03 +00:00
SomberNight 61a6ab1d95 locale: don't translate URL, like wtf
please, use common sense :(
I guess it was a copy-paste error, but still, treat all _() and qsTr() calls as "scary" and as potential attack vectors. Don't blindly call _(): every call needs to be weighed separately.
2026-02-14 09:25:39 +00:00
SomberNight d20c9364ef contrib/locale/push_locale: more deterministic messages.pot (fs order)
Tries to remove differences caused by filesystem-order in the generated .pot file.

The crowdin activity stream is full of events:
```
SomberNight_CI_BOT changed the context of 126 strings
02:42
String	Previous context	New context	File	Time
{} blocks	#: electrum/gui/qt/channel_details.py:256 #: electrum/gui/qt/channel_details.py:257 electrum/gui/qt/network_dialog.py:514 	#: electrum/gui/qt/network_dialog.py:514 electrum/gui/qt/channel_details.py:256 #: electrum/gui/qt/channel_details.py:257 	messages.pot	02:42
[...]
```
^ i.e. on every CI push, the comments containing the file paths and line-numbers were getting mixed up randomly
This is undesirable noise.
2026-02-14 08:10:26 +00:00
SomberNight cd802c6e41 CI: changed API key for crowdin translations, update notes
api key was previously for "SomberNight" crowdin acc, now it's for a fresh acc "SomberNight_CI_BOT".

- "SomberNight_CI_BOT" acc has fewer permissions overall
- the new api key is minimally scoped
  - I can't remember what the old api key was scoped to, and crowdin does not show the settings of existing api key, one can only revoke them
- the crowdin audit log can now distinguish actions of the bot vs actions I do manually
2026-02-13 17:30:35 +00:00
SomberNight 0c33994d70 plugins: hardware: HardwareHandlerBase.show_error() takes str, not exc
This is just a minor conceptual clean-up,
runtime behaviour is not being changed, as ultimately, much later in the exec flow,
the msg object being passed around is cast to str already.
(e.g. see str(text) at https://github.com/spesmilo/electrum/blob/4f7b6e897710338e8a4cfb8fa97c305218bdff88/electrum/gui/qt/util.py#L375-L379)
2026-02-12 17:04:20 +00:00
SomberNight 4f7b6e8977 contrib/freeze_packages: use stdlib "venv" vs 3rd party virtualenv 2026-02-11 15:23:16 +00:00
SomberNight fb1b811bde gitignore: add ".venv"
I have virtualenvs for different python versions in top-level folders such as .venv314.
2026-02-11 15:16:21 +00:00
ghost43 f95e6ac1e8 Merge pull request #10462 from f321x/fix_wizard_tc_exc+
wizard: fix exception when loading new tc wallet
2026-02-11 14:27:00 +00:00
f321x 3905f8d9ec wizard: fix exception when loading new tc wallet
I tried to reproduce:
https://github.com/spesmilo/electrum/issues/8815#issuecomment-2094259186
which triggered the following exception for me:

```
Traceback (most recent call last):
  File "/home/user/code/electrum-fork/electrum/gui/qt/__init__.py", line 409, in start_new_window
    window = self._create_window_for_wallet(wallet)
  File "/home/user/code/electrum-fork/electrum/gui/qt/__init__.py", line 329, in _create_window_for_wallet
    w = ElectrumWindow(self, wallet)
  File "/home/user/code/electrum-fork/electrum/gui/qt/main_window.py", line 290, in __init__
    self.load_wallet(wallet)
    ~~~~~~~~~~~~~~~~^^^^^^^^
  File "/home/user/code/electrum-fork/electrum/util.py", line 495, in do_profile
    o = func(*args, **kw_args)
  File "/home/user/code/electrum-fork/electrum/gui/qt/main_window.py", line 589, in load_wallet
    self.update_recently_opened_menu()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/home/user/code/electrum-fork/electrum/gui/qt/main_window.py", line 741, in update_recently_opened_menu
    for i, k in enumerate(recent):
                ~~~~~~~~~^^^^^^^^
TypeError: 'NoneType' object is not iterable
```

This happens because the trustedcoin wallet is loaded outside of
Daemon.load_wallet() so Daemon.update_recently_opened_wallets()
is not getting called and config.RECENTLY:_OPEN_WALLET_FILES is
still None when we try to iterate through it.
As fix i now use load_wallet() instead of manually
instantiating the Wallet
and additionally handle
RECENTLY_OPEN_WALLET_FILES being None in
ElectrumWindow.update_recently_opened_menu().

My pull request https://github.com/spesmilo/electrum/pull/10121
would have sent this exception to the crash reporter so we
might have noticed it earlier. I think we should not just catch
all exceptions in the wizard like on master as it causes us to
repeatedly miss regressions in the wizard that could be sent to
the crash reporter.
2026-02-11 09:14:35 +01:00
ghost43 f2a70357c3 Merge pull request #10121 from f321x/qml_create_storage_exc
wizard: raise more specific exc in create_storage() and pass some to crash reporter
2026-02-10 16:55:07 +00:00
SomberNight 5ca2699580 qt: wizard: (trivial) simplify prevprev (HEAD~1)
ref 457a09219e
2026-02-10 16:47:49 +00:00
ghost43 aefc4aa5b3 Merge pull request #10459 from SomberNight/202602_lnaddr_format_rtags
lnwallet.pay_to_node: log r_tags from invoice
2026-02-09 17:06:21 +00:00
SomberNight 21c1dd8c96 Merge remote-tracking branch 'spesmilo/pr/10451': history export
merges https://github.com/spesmilo/electrum/pull/10451
2026-02-09 16:40:43 +00:00
ThomasV 7e73aa7b7a CLI: separate list_channels and list_channel_backups
Add '--public' option flag to list public channels
2026-02-09 11:39:54 +01:00
ThomasV b03d6a478d gossip: broadcast channel updates along with channel announcements
The channel update in mark_open is only sent once, and only to the
channel peer. In addition, it seems to be discarded by Eclair.
2026-02-09 11:00:16 +01:00
ThomasV b2a3e08ac8 ignore exceptions in process_gossip
A failing signature verification should not kill the taskgroup
2026-02-09 10:58:24 +01:00
ghost43 3e18d010e8 Merge pull request #10452 from SomberNight/202601_build_android_debian13
build: android: upgrade docker base img to debian 13
2026-02-04 16:59:22 +00:00
f321x 2fd74c1884 qml: wizard: differentiate between create_storage exc types
Differentiate between the `UserFacingException` and other exceptions
when creating the storage. Forward other exceptions to the reporter so
they can get fixed.
2026-02-04 11:56:51 +01:00
f321x 457a09219e qt: wizard: differentiate between create_storage exc types
Differentiate between the `UserFacingException` and other exceptions
when creating the storage. Forward other exceptions to the reporter so
they can get fixed.
2026-02-04 11:56:49 +01:00
f321x 06f9d87523 wizard: raise more specific exc in create_storage()
Modifies `NewWalletWizard.create_storage()` to raise more specific
exception types instead of plain `Exception`. This should allow the
calling GUI to separate between non-bug exceptions (like invalid user
input), and bugs which should not happen and be
passed to the bug reporter.
2026-02-04 11:56:44 +01:00
ghost43 6083808191 Merge pull request #10461 from romanz/ts5
Support TS5 in `TrezorClientBase.device_model_name()`
2026-02-04 02:26:26 +00:00
Roman Zeyde 38a0acffb4 Support TS5 in TrezorClientBase.device_model_name() 2026-02-03 21:37:29 +01:00
ghost43 9644283988 Merge pull request #10441 from f321x/fix_10437
Wizard/qt/qml: validate server address input, fix #10437
2026-02-03 17:09:18 +00:00
f321x a6a57f0fec tests: add unittest for Abstract_Wallet.export_history_to_file
Adds unittest for Abstract_Wallet.export_history_to_file that
compares the output against reference files. This
should help to prevent regressions and ensure the layout
of the export stays static over time.
2026-02-03 18:01:14 +01:00
f321x e1dac558dd history export: make fees bitcoin, add hook, rm local tx
Change fees from sats to bitcoin so the fee value is consistent with the
other values.
Fixes #10445

Also adds a plugin hook so plugins can create fancy history exports.

And stops adding unconfirmed/local transactions to the history as they
are unordered and make the export non-deterministic. Also transactions
that haven't happened yet don't seem useful for accounting.
2026-02-03 18:01:12 +01:00
f321x 68144588dd move history export from HistoryList to Abstract_Wallet
Moves the history export function to Abstract_wallet so it can be
unittested and called from other places like the cli or QML too.
2026-02-03 18:01:11 +01:00
f321x 34f008efa2 qt: make do_export_history independent of HistoryList
So it can be moved out of HistoryList, get unittested and potentially
used by QML too for example.

Also fix inconsistency between fiat_value and fees_fiat, sometimes if
fiat_value was `No Data` (value=None), fees_fiat was '0' as
fees_fiat.value was Decimal() instead of None.
2026-02-03 18:01:04 +01:00
SomberNight 4d4cff7840 lnwallet.pay_to_node: log r_tags from invoice
and add helper "format_bolt11_routing_info_as_human_readable"
2026-02-03 07:36:20 +00:00
ghost43 dcfef1111f Merge pull request #10457 from bgridley/ledger-nano-gen5-support
Support for Ledger Nano Gen5
2026-02-02 16:36:40 +00:00
ThomasV 3979d7016e channels_list: remove anchor icon
Anchor outputs are not optional, so this icon does not add meaningful
information to the user. It is only marginally useful for debuging.
2026-02-02 10:12:58 +01:00
Ben Gridley 2c058c97eb add support for Nano Gen5 2026-02-01 16:35:04 -07:00
SomberNight 4da7b7f55d build: android: use Java 17, as before debian upgrade :/
When building on debian 12, we were using Java 17.
On debian 13, Java 17 is not packaged anymore, instead there is Java 21 and 25.
Ideally we should upgrade to Java 21 and just install it from apt.

However old Gradle is not compatible with new Java, so we have to upgrade Gradle for that.
- see https://docs.gradle.org/current/userguide/compatibility.html

Old Gradle is giving build errors with Java 21:
```
Could not compile build file '/home/user/wspace/electrum/.buildozer_qml/android/platform/build-arm64-v8a/dists/Electrum/build.gradle'.
> startup failed:
General error during conversion: Unsupported class file major version 65

java.lang.IllegalArgumentException: Unsupported class file major version 65
```

for our p4a fork, I tried to cherry-pick stuff from upstream:
- https://github.com/kivy/python-for-android/commit/17bf5322791ec8cec85836fbe906e63664a05445
- https://github.com/kivy/python-for-android/pull/3172
    https://github.com/kivy/python-for-android/commit/a8f2ca1c5b1bb6696b47fdf2c052285e116e0ebe
- see https://github.com/SomberNight/python-for-android/compare/a01269f7799587ad74ee40e0b642d917b8db7d4e...846a1094874aeb64b623fa746222a41851245271

That seems sufficient to upgrade Gradle as far as p4a is concerned.

However that still did not work yet:
- contrib/android/make_barcode_scanner.sh fails, as
    markusfisch/zxing-cpp and markusfisch/CameraView
    are also using too old gradle versions for Java 21
    - it seems they are intentionally doing this to maintain compat with Android 4:
        see https://github.com/markusfisch/zxing-cpp/commit/d98ed5d0be513c4077b4c13d1f7873f141949839

So for now maybe the path of least resistance is to downgrade to Java 17 :(
2026-01-30 16:45:13 +00:00
ghost43 b7e58f659a Merge pull request #10448 from f321x/gossip_0126
lnpeermgr: fix proxy check in add_peer, don't connect to onion peers if no proxy
2026-01-29 18:52:10 +00:00
SomberNight 35ca9b4fff build: android: build and use python 3.12 on host, instead of apt 3.13
- want to do the android build on debian 13 (stable)
- debian 13 ships python 3.13 in apt
- p4a requires Cython < 3.0
    - ref https://github.com/kivy/python-for-android/issues/2919
    - ref https://github.com/kivy/buildozer/issues/1526
    - the newest such Cython is version 0.29.37, which predates python 3.13
        - the latest python I managed to build cython 0.29.37 with is 3.12
- upstream p4a really would need some love :(
    - this is not even just an issue on our p4a fork, but still unsolved upstream
        - re rebasing our fork: https://github.com/spesmilo/electrum/issues/10331
2026-01-29 17:13:40 +00:00
SomberNight 4d33b6cad9 build: android: upgrade docker base img to debian 13
This should make the F-Droid build simpler.
ref https://gitlab.com/fdroid/fdroiddata/-/merge_requests/32358#note_3038803195
2026-01-29 15:27:49 +00:00
ThomasV 9aa2898c15 test_lnpeer: fix typo in test_reestablish 2026-01-29 14:16:20 +01:00
ThomasV be3e05d7c0 lnhtlc: move LOG_TEMPLATE to top.
This commit only moves code.
2026-01-28 17:49:36 +01:00
ThomasV 5767913e07 lnhtlc: remove unneeded non-initiator fee_update in log 2026-01-28 12:32:59 +01:00
ThomasV e1103266e6 lnmsg: pass filename as parameter instead of boolean 2026-01-28 12:08:35 +01:00
f321x 79ef429b3c lnworker: don't connect to onion peers if no proxy
When gossip is enabled we waste a lot of time trying to connect
to onion peers if we don't have a proxy enabled. We should just skip
them and try to connect to clearnet peers instead.
2026-01-27 13:14:31 +01:00
f321x db6b6a16f8 lnpeermgr: add_peer: fix check if proxy enabled
LNPeerManager.add_peer would only check if self.network.proxy is set,
which it is always as Network is initialized with self.proxy =
ProxySettings(). Instead it should check if proxy is set and enabled.
2026-01-27 12:49:19 +01:00
f321x 1c5408cccb ServerConnectWizard: don't set autoconnect on user cancel
Don't set the NETWORK_AUTO_CONNECT config if the user checked the custom
server config checkbox and then cancels the wizard, so the next time the
user starts the wizard they again will have the choice instead of
silently being forced into a random server.
Currently if the user cancels the wizard during the network config the
welcome component will already have set the NETWORK_AUTO_CONNECT config
to False (as the user selected the custom server checkbox), preventing
the wizard from starting again on the next startup.
2026-01-26 15:28:54 +01:00
f321x 10aecf66fd ServerConnectWizard: use default server instead of ''
Passes the default server (Network.default_server) to
Network.set_parameters instead of an empty string in
ServerConnectWizard.do_configure_server to avoid a traceback like in
I am not entirely sure how the user in #10437 managed to trigger
the exception as Network.set_parameters should already exit early at
`not self._was_started` in the Wizard as the network shouldn't have been
started yet during the wizard. However passing the default ServerAddr
instead of an empty string to set_parameters should avoid this
exception.
2026-01-26 14:40:04 +01:00
f321x 5952d8c614 qml: validate server address in ServerConfig
Same as Qt, validate the server address the user enters and prevent the
user from continuing in the wizard or clicking 'Ok' in the ServerConfig
if the entered address is clearly invalid.
2026-01-26 14:40:02 +01:00
f321x c3d1b2046a qt: ServerWidget/wizard: validate server_e
The `ServerWidget` didn't validate the input of server_e, which allowed
the user to enter an invalid server connection string and exit the
dialog without knowing they entered an invalid string.
In the wizard this behavior is very misleading as the user explicitly
wanted to use a custom server, can click next after entering an invalid
server, and we will just silently fall back to automatic server selection.

This change will disable the "Next" button in the wizard if an invalid
address has been entered and show a red background in the server_e while
the input is not valid, so the user clearly sees that this input is not
going to be used.
2026-01-26 14:39:59 +01:00