1
0
Commit Graph

15121 Commits

Author SHA1 Message Date
SomberNight
2089f06ffa add .gitattributes file for end-of-line normalisation
This should prevent accidentally committing files with CRLF line endings to the repo.

related: https://github.com/spesmilo/electrum/issues/8025

see https://git-scm.com/docs/gitattributes#_end_of_line_conversion :
> If you want to ensure that text files that any contributor introduces to the repository have their line endings normalized, you can set the text attribute to "auto" for all files.
> ```
> * text=auto
> ```
>
> From a clean working directory:
> $ echo "* text=auto" >.gitattributes
> $ git add --renormalize .
> $ git status    # Show files that will be normalized
> $ git commit -m "Introduce end-of-line normalization"

-----

I have tried to find some large cross-platform projects that use git for EOL normalisation.
Notably the golang/go project recommends against it, but the others have it in some form:

4ec9ed8fde/.gitattributes
160bb0e66b/.gitattributes
7fda097623/.gitattributes
103a5c98b8/.gitattributes
0990046d8d/.gitattributes
1c2dc79f51/.gitattributes
0d65a985b9/.gitattributes
d3bafb8b6e/.gitattributes
2022-10-20 19:49:49 +00:00
SomberNight
c5d17183f7 qt BTCAmountEdit: clamp field to <=21 million bitcoins
fixes https://github.com/spesmilo/electrum/issues/5223
2022-10-19 18:07:02 +00:00
SomberNight
1f5ab5cb8d qt AmountEdit: small refactor 2022-10-19 17:22:23 +00:00
SomberNight
eb00012c95 invoices: fix is_paid for zero-amount onchain pay reqs
fixes https://github.com/spesmilo/electrum/issues/8022
2022-10-19 16:15:12 +00:00
SomberNight
60769e4769 be more robust to "electrum/www" missing 2022-10-19 14:15:44 +00:00
SomberNight
0fc90e07c9 update "www" submodule: adapt payserver js to electrum 4.3 invoice api 2022-10-19 14:00:55 +00:00
Sander van Grieken
3590385fa2 Revert "only create lightning invoice if the wallet has channels in a suitable state"
This reverts commit 717b6dd5fb.
2022-10-19 14:50:38 +02:00
Sander van Grieken
c7cdd42665 qml: ui 2022-10-19 14:15:24 +02:00
Sander van Grieken
717b6dd5fb only create lightning invoice if the wallet has channels in a suitable state 2022-10-19 12:27:19 +02:00
Sander van Grieken
bb3f3991e8 qml: detect request paid status on receive dialog 2022-10-19 10:02:11 +02:00
Sander van Grieken
49037ecc85 qml: handle bitcoin: and lightning: uri intents 2022-10-18 18:31:59 +02:00
Sander van Grieken
3a8cfcd5b8 qml: add total balance, fix initialization of create recoverable channels setting 2022-10-17 17:24:46 +02:00
Sander van Grieken
80f2bf7c09 qml: incoming flag not always correct for determining debit/credit. Use 'value' instead 2022-10-17 16:43:38 +02:00
Sander van Grieken
26534094db qml: invoicemodel and requestmodel update invoice status via event listener 2022-10-17 15:46:36 +02:00
Sander van Grieken
0c163a5322 qml: don't duplicate invoice (e.g. when scanned twice)
also add invoice to invoiceModel from python, not qml
2022-10-17 15:44:27 +02:00
Sander van Grieken
f64d344dcd qml: Remove key exist check in lnworker.payment_info
We don't use its result, and I've seen one occasion where a payment exists in history, but not in payment_info dict
2022-10-17 12:14:02 +02:00
Sander van Grieken
922fa1adbc ci: add QML Android CI builds for arm64 and arm32 architectures
conservatively only builds on tagged commits, or any commit on the ci-qml-beta branch
2022-10-17 11:49:25 +02:00
Sander van Grieken
5042d9971c qml: update history when LN payment arrives 2022-10-17 11:34:32 +02:00
SomberNight
4b8790c919 qt 2fa: show different status-bar icon for "2fa disabled" wallet
related: https://github.com/spesmilo/electrum/issues/8018
2022-10-16 15:10:46 +00:00
SomberNight
f2e3d11014 qt gui __init__: rm deprecated QApplication attr AA_X11InitThreads
From https://doc.qt.io/qt-5/qt.html :
> The following values are deprecated or obsolete:
> Constant              Value   Description
> Qt::AA_X11InitThreads 10      This value is obsolete and has no effect.

We started setting this attribute back when using Qt4,
as a workaround for some threading issues: https://github.com/spesmilo/electrum/pull/2820

However,
- in Qt5 it no longer has any effect,
- the original threading issues were fixed
  in https://github.com/spesmilo/electrum/pull/3326 and https://github.com/spesmilo/electrum/pull/3330
2022-10-14 19:02:23 +00:00
SomberNight
6d01dbcc5c android build: "req..-build-android.txt" to only use source pkgs 2022-10-14 17:59:18 +00:00
SomberNight
a99c8cca1e requirements-build-android: update deps for buildozer
virtualenv does not seem to be needed given python3-venv

upstream ref: https://github.com/kivy/buildozer/pull/1515
2022-10-14 17:59:14 +00:00
SomberNight
bba1bce833 requirements-build-android: update deps for python-for-android
`six` no longer required:
1f62452375

`pep517` version bound was relaxed:
25f3a534d8
2022-10-14 16:51:11 +00:00
ghost43
7d4538ce22 Merge pull request #7999 from SomberNight/202208_build_tighten2
build: tighten build system to only use source pkgs in more places
2022-10-14 16:48:37 +00:00
SomberNight
c6246a7e1c rerun freeze_packages 2022-10-14 16:22:23 +00:00
SomberNight
5f83538f05 requirements: pin protobuf "<4" also in "req..-hw.txt"
related:
52b73880f9
https://github.com/spesmilo/electrum/issues/7922
2022-10-14 16:18:55 +00:00
SomberNight
328455bc8c freeze_packages: restrict some requirements files to source-only pkgs 2022-10-14 16:18:51 +00:00
SomberNight
0efc8815a4 android build: bump targetSdkVersion from 30 to 31
The google play store will require 31, starting 2022-11 (next month).
A few commits are cherry-picked onto our forks of p4a and buildozer
from upstream, but the forks are not rebased.

Note that the compileSdkVersion is kept at 30,
only the targetSdkVersion is bumped 30->31.

closes https://github.com/spesmilo/electrum/pull/8010

I am trying to upstream some relevant p4a and buildozer changes
in e.g. https://github.com/kivy/python-for-android/pull/2686
2022-10-14 15:56:33 +00:00
SomberNight
1789778673 android build: p4a to build pyqt5 using "hostpython" instead of sys py
The current system python in the docker baseimage is py3.9, while the
targetpython and hostpython built by p4a are py3.8, and this was causing
linker issues in the pyqt5 build.
It is also cleaner IMHO to have p4a handle what is needed for a recipe
instead of assuming it is available in the system. (and I think this is
how other existing recipes work)

fixes https://github.com/spesmilo/electrum/issues/8016
2022-10-14 15:52:33 +00:00
ThomasV
47c480be49 check_scriptpubkey_template_and_dust: support anysegwit. fix #8012 2022-10-12 10:06:56 +02:00
SomberNight
34488478e6 appimage build: build and include libxcb-util1
fixes https://github.com/spesmilo/electrum/issues/8011

> Upgraded from Appimage 4.1.5 to 4.3.2 on MX-Linux 19.
> The new version fails to start with:
>
> ```
> $ electrum
> qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
> This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may > fix this problem.
>
> Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.
>
> Aborted (core dumped)
> ```

debian 10 only distributes libxcb-util0.
debian 11 distributes libxcb-util1.
our base image atm is debian 10, so we build the package from source.
2022-10-11 18:24:02 +00:00
ghost43
b619e2b3af Merge pull request #8003 from SomberNight/202210_android_debug_logs
android: add setting to enable debug logs
2022-10-10 19:03:52 +00:00
SomberNight
656fd1bca1 android readme: expand "Access datadir from desktop" section 2022-10-10 18:56:48 +00:00
SomberNight
174cbde762 kivy: window.request_focus_for_main_view: fix compat with newer pyjnius
```
Traceback (most recent call last):
  File "kivy/_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events
  File "kivy/_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/uix/dialogs/password_dialog.py", line 227, in <lambda>
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/uix/dialogs/password_dialog.py", line 333, in <lambda>
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/main_window.py", line 721, in on_open_wallet
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/main_window.py", line 687, in on_wizard_success
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/util.py", line 445, in <lambda>
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/util.py", line 441, in do_profile
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/main_window.py", line 940, in load_wallet
  File "/home/user/wspace/electrum/.buildozer_kivy/android/app/electrum/gui/kivy/main_window.py", line 950, in request_focus_for_main_view
  File "jnius/jnius_export_class.pxi", line 844, in jnius.jnius.JavaMethod.__call__
jnius.jnius.JavaException: Cannot call instance method b'requestFocusForMainView' on class b'org/kivy/android/PythonActivity'
```
2022-10-10 14:43:43 +00:00
SomberNight
34b594ea40 android: add setting to enable debug logs
If enabled, we log to stderr, which can get inspected via logcat.
Not user-friendly at all - but previously there was no way to get logs from a release build.

closes https://github.com/spesmilo/electrum/issues/7409
2022-10-07 20:28:52 +00:00
Sander van Grieken
685f32750c qml: ui 2022-10-05 18:00:51 +02:00
Sander van Grieken
488600788e qml: open invoices list after saving invoice, add invoice to model instead of reloading the whole list 2022-10-05 11:07:40 +02:00
Sander van Grieken
090706bfd6 qml: fix crashes on tx finalizing 2022-10-04 21:51:55 +02:00
Sander van Grieken
2118eb57bd qml: follow-up de83a10c20 2022-10-04 16:35:28 +02:00
Sander van Grieken
de83a10c20 qml: restore Save button in InvoiceDialog, restore invoice list view, now from menu 2022-10-04 16:33:22 +02:00
Sander van Grieken
6dab3de1f2 qml: start new wallet wizard if no wallets exist, create/open button opens wizard if no wallets exist 2022-10-04 15:09:37 +02:00
Sander van Grieken
8184093a34 qml: start new wallet wizard immediately after network wizard on initial start 2022-10-04 14:34:48 +02:00
Sander van Grieken
dff435a745 qml: expose use_recoverable_channels in config/preferences 2022-10-04 14:20:46 +02:00
Sander van Grieken
e5951bbd2d qml: expose RbF in config/preferences 2022-10-04 14:14:03 +02:00
Sander van Grieken
98c747ea6e qml: use -w command line parameter to open wallet, if specified 2022-10-04 12:35:07 +02:00
ThomasV
8867387847 lnworker: fix stuck payment loop (fixes #7995)
If the short_channel_id of a channel update received
with update_fail_htlc does not match the channel in
our route, blacklist the channel in our route.
2022-10-04 10:51:18 +02:00
Sander van Grieken
f9156912a3 qml: move balancesummary to controls/ 2022-10-04 10:42:26 +02:00
Sander van Grieken
b4d13ffb41 qml: show balance summary on top 2022-10-04 10:42:26 +02:00
ThomasV
ff5ba7cca4 rbf: fix issues with bump_frr_through_decreasing_change
- break from loop if target is reached
- recompute delta if there is no next iteration.
2022-10-04 10:23:58 +02:00
Sander van Grieken
54b69348f4 qml: scroll-drag in history, fix a few more assumptions w.r.t positioning of listview and size of indicator 2022-10-03 17:36:38 +02:00