1276 Commits

Author SHA1 Message Date
ghost43 9b26c1812d Merge pull request #10485 from accumulator/ndk28_qt610_rebase_p4a
p4a rebase, use ndk28 and qt6.10
2026-04-24 17:06:25 +00:00
SomberNight 96a3345ab5 setup.py: "qml_gui" extra: update pyqt version 2026-04-24 16:48:34 +00:00
ghost43 cc1874c9c9 Merge pull request #10575 from f321x/lnurlw_prefix
pi: handle lud-17 lnurl URIs
2026-04-24 15:00:07 +00:00
SomberNight 5af40f435a Merge branch '202604_pr10603_ledger'
adapt Ledger_Client_Legacy to work with newer ledger bitcoin app

manual merge of https://github.com/spesmilo/electrum/pull/10603
2026-04-24 13:57:23 +00:00
SomberNight 1096ebcd6a build: update pinned ledger-bitcoin (partial rerun freeze_packages) 2026-04-24 13:51:07 +00:00
Ilya Artemov 44570bfa3b Bump minimum required version of ledger_bitcoin (build-time and runtime) 2026-04-24 09:09:00 +02:00
Roman Zeyde 8e49eb8087 appimage: update Dockerfile dependencies 2026-04-22 12:08:32 +02:00
Sander van Grieken 83b6770021 android: remove unneeded dl-ndk-ci.sh 2026-04-22 11:26:06 +02:00
Sander van Grieken 29b5e1672b p4a ref 1098be6964cfc2156959e435e81c2c50f8398586 2026-04-22 11:17:30 +02:00
Sander van Grieken 7b7d7028bd android: hash-pin hostpython prerequisites for pyqt6sip and sip 2026-04-22 11:13:32 +02:00
Sander van Grieken 9d5b4a7cd9 android: use plain 'build' dependency (using 'venv') instead of 'build[virtualenv]',
remove setuptools as its use is now pinned via hostpython_prerequisites where applicable,
update depends asserts in pyqt6sip, sip, pyqt_builder
2026-04-22 10:15:30 +02:00
Sander van Grieken c8f5798d4e android: build pyqt_builder and sip ourselves, hash pin all hostpython_prerequisites 2026-04-22 10:15:30 +02:00
Sander van Grieken 854f95b794 android: openssl 3.0.18 2026-04-22 10:15:30 +02:00
Sander van Grieken 74f3c0427d android: pin hostpython3 PyProjectRecipe versions,
pin android and pyjnius recipes Cython version
2026-04-22 10:15:30 +02:00
f321x 323189874b android: update Qt6 to 6.10.2, PyQt6 to 6.10.2 2026-04-22 10:15:30 +02:00
Sander van Grieken 42472a1e94 android: minimum API 26 required for Qt6.10 (Android 8.0) 2026-04-22 10:15:30 +02:00
Sander van Grieken 4d55b049b6 android: upgrade to androidx.core:core:1.16.0 from com.android.support:support-compat:28.0.0 2026-04-22 10:15:30 +02:00
Sander van Grieken dba6b751cc android: update for rebase p4a, update qt to 6.10, ndk to 28
p4a rebased on spesmilo/electrum_202602, 375a05de21b538d704174b1efeb3fc85d151f94e
2026-04-22 10:15:30 +02:00
f321x 1ba31448a3 ci: bump code review ci claude version 4.6 -> 4.7
An improved Claude Opus version got released, this bumps the code review
CI to use it.
2026-04-21 13:24:02 +02:00
f321x 78135ac8b2 windows: delete lightning URI hooks on uninstall
On install we register the URIs for bitcoin, lightning, lnurlp and lnurlw
in the registry but on uninstall we would only remove bitcoin again.
2026-04-13 09:32:25 +02:00
f321x ef702d74cd pi: handle lud-17 URI payment identifier
LNURL-W/P can also be encoded in lud-17 form instead of bech32.
https://github.com/lnurl/luds/blob/luds/17.md
e.g.
lnurlw://example.com/api/test123
lnurlp://example.com/api/test123
2026-04-13 09:30:28 +02:00
f321x 7adc833f21 contrib: check for unsigned apk in release.sh
release.sh expects signed apks. if a non-releasemanager uses
release.sh to build it will build the apks unsigned and then
rename them to the same name as the signed apks. However
if the apks have already been built separately and are still named
*-unsigned.apk it will not detect them and instead try to build them
again. Instead it should just rename them to *-release.apk as if built
directly through release.sh.
2026-04-02 13:49:32 +02:00
f321x 88f9c49a60 ci: add claude code code review
Adds a CI step to the Cirrus CI which will run claude code on the diff
of a Pull Request and fail if it finds critical security vulnerabilities
or serious code issues. Optinally it can be given a GitHub api key to
create a comment in the pull request.
2026-03-27 18:29:07 +01:00
SomberNight 42ad18b216 rm bip70 support
- could not find a single project that still actually cares about bip70 [0]
    - well except maybe BitPay.
        - but I cannot test with BitPay:
            - they have a testnet3 staging environment on test.bitpay.com
                - but the SSL cert they use for bip70 has expired in 2021
                - the webUI probably also has not been updated since then...
                    - they claim to have added LN support in 2022 in a blog post,
                        but it's not there on test.bitpay.com
            - on mainnet, they require KYC before payment
                - < ... angry noises >
            - their loss then, I don't care.
- this is code that no one wants to maintain

- this does not yet delete the signed bip70 payment data for historical txs
    - but it is no longer possible to export it from the GUI

[0]: https://bitcoinops.org/en/topics/bip70-payment-protocol/
2026-03-20 18:12:55 +00:00
SomberNight 31ed05c05c build: win: change from win-iconv to GNU libiconv
- (zbar requires [0] iconv)
- issues [1][3] compiling win-iconv:
    - pre-existing issue: lots of "-Wincompatible-pointer-types" warnings when compiling zbar with win-iconv
    - new debian means newer GCC
    - new GCC changed that [2] warning type to "error"
- GNU libiconv works as an alternative
    - drawback: win-iconv is more minimal, it uses the win32 API to do most of the work
    - still, is a 25+ year old GNU project with one release every ~2 years, so IMO fine

[0]: https://github.com/mchehab/zbar/blob/a549566ea11eb03622bd4458a1728ffe3f589163/README-windows.md
[1]: https://github.com/SomberNight/electrum/commit/cb00cb60cf9a0cb059dcac5e7acfe5186620cabe
[2]: https://gcc.gnu.org/pipermail/gcc-cvs/2023-December/394351.html

[3]: see snippet when compiling libzbar:
```
decoder.c: In function ‘zbar_decoder_reset’:
decoder.c:116:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  116 |     memset(dcode, 0, (long)&dcode->buf_alloc - (long)dcode);
      |                      ^
decoder.c:116:48: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  116 |     memset(dcode, 0, (long)&dcode->buf_alloc - (long)dcode);
      |                                                ^
  CC       processor/libzbar_la-win.lo
/bin/bash ../libtool --tag=RC   \
--mode=compile x86_64-w64-mingw32-windres -DHAVE_CONFIG_H -I. -I../include  \
-I../include  -o libzbar-rc.lo libzbar.rc
  CC       processor/libzbar_la-lock.lo
  CC       decoder/libzbar_la-qr_finder.lo
  CC       qrcode/libzbar_la-qrdec.lo
In file included from ./processor.h:26,
                 from processor/lock.c:25:
../include/config.h:423:9: warning: "_WIN32_WINNT" redefined
  423 | #define _WIN32_WINNT 0x0500
      |         ^~~~~~~~~~~~
In file included from /usr/share/mingw-w64/include/corecrt.h:10,
                 from /usr/share/mingw-w64/include/crtdefs.h:10,
                 from /usr/share/mingw-w64/include/assert.h:15,
                 from processor/lock.c:24:
/usr/share/mingw-w64/include/_mingw.h:232:9: note: this is the location of the previous definition
  232 | #define _WIN32_WINNT 0xa00
      |         ^~~~~~~~~~~~
libtool: compile:  x86_64-w64-mingw32-windres -DHAVE_CONFIG_H -I. -I../include -I../include libzbar.rc  -o .libs/libzbar-rc.o
  CC       qrcode/libzbar_la-qrdectxt.lo
  CC       qrcode/libzbar_la-rs.lo
  CC       qrcode/libzbar_la-isaac.lo
  CC       qrcode/libzbar_la-bch15_5.lo
  CC       qrcode/libzbar_la-binarize.lo
  CC       qrcode/libzbar_la-util.lo
In file included from ./image.h:26,
                 from qrcode/binarize.c:10:
../include/config.h:423:9: warning: "_WIN32_WINNT" redefined
  423 | #define _WIN32_WINNT 0x0500
      |         ^~~~~~~~~~~~
In file included from /usr/share/mingw-w64/include/corecrt.h:10,
                 from /usr/share/mingw-w64/include/crtdefs.h:10,
                 from /usr/share/mingw-w64/include/math.h:13,
                 from qrcode/binarize.c:7:
/usr/share/mingw-w64/include/_mingw.h:232:9: note: this is the location of the previous definition
  232 | #define _WIN32_WINNT 0xa00
      |         ^~~~~~~~~~~~
  CC       video/libzbar_la-dshow.lo
  CC       window/libzbar_la-win.lo
In file included from ./window.h:26,
                 from window/win.c:26:
../include/config.h:423:9: warning: "_WIN32_WINNT" redefined
  423 | #define _WIN32_WINNT 0x0500
      |         ^~~~~~~~~~~~
In file included from /usr/share/mingw-w64/include/corecrt.h:10,
                 from /usr/share/mingw-w64/include/crtdefs.h:10,
                 from /usr/share/mingw-w64/include/ctype.h:9,
                 from window/win.c:24:
/usr/share/mingw-w64/include/_mingw.h:232:9: note: this is the location of the previous definition
  232 | #define _WIN32_WINNT 0xa00
      |         ^~~~~~~~~~~~
In file included from ./processor.h:26,
                 from processor/win.c:29:
../include/config.h:423:9: warning: "_WIN32_WINNT" redefined
  423 | #define _WIN32_WINNT 0x0500
      |         ^~~~~~~~~~~~
In file included from /usr/share/mingw-w64/include/corecrt.h:10,
                 from /usr/share/mingw-w64/include/crtdefs.h:10,
                 from /usr/share/mingw-w64/include/assert.h:15,
                 from processor/win.c:24:
/usr/share/mingw-w64/include/_mingw.h:232:9: note: this is the location of the previous definition
  232 | #define _WIN32_WINNT 0xa00
      |         ^~~~~~~~~~~~
processor/win.c: In function ‘_zbar_processor_open’:
processor/win.c:282:47: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  282 |     proc->display = CreateWindowEx(EXT_STYLE, (LPCTSTR)(long)wca, "ZBar",
      |                                               ^
processor/win.c: In function ‘_zbar_processor_close’:
processor/win.c:297:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  297 |         UnregisterClass((LPCTSTR)(long)proc->state->registeredClass, 0);
      |                         ^
  CC       window/libzbar_la-dib.lo
qrcode/qrdectxt.c: In function ‘qr_code_data_list_extract_text’:
qrcode/qrdectxt.c:302:62: error: passing argument 2 of ‘iconv’ from incompatible pointer type [-Wincompatible-pointer-types]
  302 |                                               iconv(utf8_cd, &in, &inleft, &out,
      |                                                              ^~~
      |                                                              |
      |                                                              char **
In file included from qrcode/qrdectxt.c:12:
/usr/x86_64-w64-mingw32/include/iconv.h:43:56: note: expected ‘const char **’ but argument is of type ‘char **’
   43 |         size_t iconv(iconv_t cd, WINICONV_CONST char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
qrcode/qrdectxt.c:352:71: error: passing argument 2 of ‘iconv’ from incompatible pointer type [-Wincompatible-pointer-types]
  352 |                                             err = iconv(enc_list[ei], &in,
      |                                                                       ^~~
      |                                                                       |
      |                                                                       char **
/usr/x86_64-w64-mingw32/include/iconv.h:43:56: note: expected ‘const char **’ but argument is of type ‘char **’
   43 |         size_t iconv(iconv_t cd, WINICONV_CONST char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
qrcode/qrdectxt.c:374:53: error: passing argument 2 of ‘iconv’ from incompatible pointer type [-Wincompatible-pointer-types]
  374 |                                       iconv(eci_cd, &in, &inleft, &out,
      |                                                     ^~~
      |                                                     |
      |                                                     char **
/usr/x86_64-w64-mingw32/include/iconv.h:43:56: note: expected ‘const char **’ but argument is of type ‘char **’
   43 |         size_t iconv(iconv_t cd, WINICONV_CONST char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft);
make[2]: *** [Makefile:1089: qrcode/libzbar_la-qrdectxt.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/opt/wine64/drive_c/electrum/contrib/zbar/zbar'
make[1]: *** [Makefile:1895: all-recursive] Error 1
make[1]: Leaving directory '/opt/wine64/drive_c/electrum/contrib/zbar'
make: *** [Makefile:989: all] Error 2
🗯 ERROR: Could not build zbar
🗯 ERROR: Could not build zbar

```
2026-02-28 07:41:45 +00:00
SomberNight 3674232dd5 build: win: bump wine (10->11) 2026-02-27 16:35:05 +00:00
SomberNight b939e8779f build: win: update debian base (12->13) 2026-02-27 16:27:11 +00:00
SomberNight a36c9a24db build: appimage: fix build missing a system-wide python
```
�� INFO:  preparing electrum-locale.
[...]
running stats.py
/usr/bin/env: �python3�: No such file or directory
```

regression from https://github.com/spesmilo/electrum/commit/3afa2fcdf3cce609d8813bbdd7b5962214de5ec0

This had shown up on the CI [0] but we did not notice - there is too many random failures, too much noise :(

[0]: https://github.com/spesmilo/electrum/runs/64623983097
2026-02-26 19:34:08 +00:00
SomberNight 9dc725fa56 deps: bump libsecp256k1 version (0.7.0->0.7.1) and electrum-ecc 2026-02-25 16:38:11 +00:00
SomberNight 3afa2fcdf3 locale: gui: show translation completion percentage in language names
In the GUIs, on the language-select screen, show e.g.
  Czech (100%), Danish (13%), Dutch (54%)
instead of
  Czech, Danish, Dutch

- we count the source strings when creating the .pot PO-template file
  and add an "X-Electrum-SourceStringCount" header to it, in the push_locale.py script that uploads the .pot file to crowdin.
  - later, when we run electrum-locale/update.py to download the translations in .po files, these files will also contain the same header.
  - then when the build_locale.sh script compiles those .po files, we can read the header and use it to populate a new "stats.json" file
    that we place in electrum/locale/locale/ and bundle in the all release binaries/distributables.
    - stats.json also includes the number of translated strings for each lang
- at runtime we simply read stats.json and use the values to calculate the percentages
  - a prior implementation did not pre-calc stats.json but did all calculations at runtime (by opening all .mo translations)
    - however that was deemed to slow, hence the build-time pre-calc
      - runtime calc took 40 ms on my laptop, so I guess it could easily take 10x that on an old phone
- just as we have always been very tolerant of any locale files or even the whole locale/ dir missing, we also tolerate stats.json missing
2026-02-21 03:40:09 +00:00
f321x 0e7f7b30fc locale: rm llm_proofreader directory during build
Deletes the llm_proofreader directory during the build so
these scripts aren't bundled into the binaries.
2026-02-20 16:39:18 +01:00
SomberNight 6c1e085937 contrib/locale/push_locale: do not sort source-strings
xgettext and related tools have a -s/--sort-output option, which results in the output being lexicographically sorted. The gettext maintainers recommend against using this option and even started deprecating it in some of their tools (xgettext included):
- with -s, source strings are lexicographically sorted in the .pot/.po files
- without -s, source string are output in the same order they are found in the code
  - this way, translators have to do much fewer context switches when contributing translations

note that the qml part we have already *not* been sorting
2026-02-19 16:25:22 +00:00
SomberNight 6eb6f31301 contrib/locale/push_locale: add comments re proofreader-approval
see https://github.com/spesmilo/electrum-locale/commit/6b07fc29ceee1489d825334e0682983dc450f228
2026-02-17 13:33:05 +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 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 4f7b6e8977 contrib/freeze_packages: use stdlib "venv" vs 3rd party virtualenv 2026-02-11 15:23:16 +00: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
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
SomberNight ceadcac922 contrib: minor clean-up shell usage 2026-01-23 17:48:06 +00:00
SomberNight b495ee773d contrib/add_cosigner: fix for python 3.13
This script used to work, I assume my breakage is due to the python version.

```
Traceback (most recent call last):
File "/home/user/wspace/electrum/./contrib/add_cosigner", line 35, in <module>
    version_spec = importlib.util.spec_from_file_location('version', 'electrum/version.py')
                ^^^^^^^^^^^^^^
AttributeError: module 'importlib' has no attribute 'util'
```
2026-01-23 17:40:13 +00:00
SomberNight 69093cc183 build: appimage: fix fresh_clone builds for type2-runtime
Building the appimage with ELECBUILD_COMMIT unset would work,
however building with it set would not.

regression from https://github.com/spesmilo/electrum/commit/daaf7b7c6bd6eaa2975777f1092dc01248c680fd
2026-01-22 16:43:17 +00:00
SomberNight d5ca2e89d5 contrib/android/Readme.md: add note re adb install --user option 2026-01-19 15:33:38 +00:00
ghost43 ece52b0a4e Merge pull request #10340 from f321x/fingerprint
android: implement biometric authentication (fingerprint)
2026-01-19 15:22:17 +00:00
user 5dd3dda238 android: implement biometric authentication
Allows to unlock the android app with the android biometric api (e.g.
fingerprint). Can be enabled in the settings.
2026-01-13 18:10:00 +01: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]: https://github.com/kivy/python-for-android/pull/2850/commits/78db83223f4f481598343237a6b8788fb4731a00  (which got squashed into https://github.com/kivy/python-for-android/commit/83e74cac0fa230231f63b7d7e4f1e8581fd9e2ce)
2025-12-27 03:31:19 +00: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 https://github.com/spesmilo/electrum/commit/87d82f38c559ef27c7f749dac565a92d984148da
2025-12-22 14:44:32 +01:00
ghost43 ef240052af Merge pull request #10332 from SomberNight/202511_p4a_hacks
android build: update openssl, and switch cryptography->pycryptodomex
2025-12-11 17:47:52 +00:00
SomberNight cfa052bc86 android build: switch from "cryptography" to "pycryptodomex"
We had been using an ancient version of "cryptography" so far in our p4a fork,
however it is not compatible with OpenSSL 3.0. (Previously we were building it with OpenSSL 1.1)

Bumping "cryptography" is difficult, as building new versions of it from source requires a full rust toolchain.

Instead, this commit switches to "pycryptodomex", as a replacement, which is much easier to build from source.
2025-12-11 17:42:42 +00:00
SomberNight 2d4d4dbdc8 android build: bump openssl (1.1.1w -> 3.0.18) 2025-12-11 17:42:29 +00:00