Commit Graph

7622 Commits

Author SHA1 Message Date
ThomasV
3721f04ac8 replace electrum/ecc with electrum_ecc package 2024-10-10 15:46:00 +00:00
SomberNight
6e46fb329d qml/qeapp.py: (trivial) use os.path.join for constructing path
There is an issue with plyer on Windows, which I thought was related to the mixed
backwards/forward slashes in the path, but no, this change still did not fix it:
```
  1.84 | D | gui.qml.qeapp.QEAppController | sending push notification to OS: message='heyheyhey'
Traceback (most recent call last):
  File "...\electrum\electrum\util.py", line 1111, 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
```
2024-10-10 15:42:39 +00:00
ThomasV
6006971ab7 rm deprecated helptext from old swap protocol 2024-10-10 15:21:40 +02:00
Sander van Grieken
fbca54db49 qml: styling OpenChannelDialog 2024-10-10 12:50:16 +02:00
ghost43
acc839623f Merge pull request #9238 from accumulator/issue9236
commands: require wallet password for lnpay command

closes https://github.com/spesmilo/electrum/issues/9236
2024-10-10 00:40:04 +00:00
Sander van Grieken
c191fbec29 cli: require password for close_channel, request_force_close, export_channel_backup, reverse_swap, rebalance_channels 2024-10-09 18:04:26 +02:00
Sander van Grieken
94c54f7057 qml: sweep: allow sweep to watch-only wallet, but ask confirmation. 2024-10-09 17:45:40 +02:00
SomberNight
48527b1501 sweep: trivial clean-up
- wallet.get_receiving_addresses is guaranteed to exist (maybe it was only for HD wallets in the past)
- wallet.is_mine is stricter than wallet.adb.is_mine, usually we want the former
2024-10-09 15:09:49 +00:00
Sander van Grieken
d918067f77 qml: sweep: just use wallet.get_receiving_address() 2024-10-09 16:55:43 +02:00
Sander van Grieken
831aa80661 qml: remove pageindicator from wizard 2024-10-09 16:38:28 +02:00
Sander van Grieken
8ff7457bf2 qml: styling Pin dialog, fix size glitching 2024-10-09 12:11:46 +02:00
Sander van Grieken
b209d09c1e commands: require wallet password for lnpay, get_channel_ctx commands 2024-10-09 11:21:16 +02:00
accumulator
117c7b2c2a Merge pull request #9203 from accumulator/qml_sweep_privkeys
qml: Sweep from privkeys
2024-10-09 11:14:00 +02:00
Sander van Grieken
3cabbf7caa qml: sweep: obtain wallet address like desktop 2024-10-09 11:06:59 +02:00
ghost43
8c9263fb20 Merge pull request #7154 from SomberNight/202103_cmd_importprivkey
commands: extend "importprivkey" to allow importing a list of keys
2024-10-08 16:52:14 +00:00
SomberNight
37d090c621 commands: check password already in decorator
Previously it was only the actual commands that directly or indirectly verified
the password. This adds a check that runs for any command requiring a password.

related https://github.com/spesmilo/electrum/pull/9238
2024-10-08 15:15:42 +00:00
Sander van Grieken
1d7ccb3928 qt: new_channel_dialog: unfreeze amount when pressing Min while Max is checked 2024-10-08 16:54:21 +02:00
SomberNight
d35ed6935d commands: extend "importprivkey" to allow importing a list of keys
This is most useful if the user wants to import a significant number of keys,
as every invocation of `importprivkey` results in rewriting the wallet file to disk.

The API of "importprivkey" is left unchanged for the single privkey case.
2024-10-08 14:11:19 +02:00
Sander van Grieken
fe95a5ec8f qml: sweep: tone down logging 2024-10-08 12:24:03 +02:00
Sander van Grieken
a8833eb650 qml: add sweep icon 2024-10-08 12:16:19 +02:00
Sander van Grieken
db865f6f72 openalias: only consider TXT records, as DNS can return other records we did not ask for. 2024-10-08 11:58:34 +02:00
ThomasV
f471356278 Merge pull request #9235 from spesmilo/external_plugins
Unix: Import external plugins from /opt/electrum_plugins
2024-10-08 10:49:19 +02:00
Sander van Grieken
c6a0018c52 payment_identifier: regard BIP21 without address and without bolt11 invalid 2024-10-08 10:33:08 +02:00
ThomasV
333b3db8ea Unix: Import external plugins from /opt/electrum_plugins 2024-10-08 10:32:37 +02:00
SomberNight
7542378c70 set stricter UNIX permissions for log files
Looks like stdlib was creating them with 0o664 :/
2024-10-07 18:50:26 +00:00
Sander van Grieken
70ebe4fc2f qml: wallet name size in wizard 2024-10-07 14:52:48 +02:00
Sander van Grieken
01b38ae5dd qt: use delegate QTranslator to gettext (as in QML) and include Qt standard lib translations for strings
used by QTextEdit.createStandardContextMenu()
2024-10-07 13:08:23 +02:00
Sander van Grieken
c7fc3f295a qt/transaction_dialog: fix translation issues 2024-10-07 11:24:14 +02:00
SomberNight
6d593e3373 qt gui: settings: make two_trampoline cb conditional on trampoline_cb
The setting is irrelevant if trampoline is disabled.
This clears up potential confusion, as per user "js" on irc.
2024-10-04 15:44:34 +00:00
ThomasV
e2afe2059b move tx grouping code from lnworker to submarine_swaps
This better encapsulates the swaps logic. If we turn
submarine_swaps into a plugin, these methods can be
replaced by hooks.
2024-10-03 14:49:00 +02:00
ghost43
76bed2327e Merge pull request #9221 from SomberNight/202409_android_apk_version
android: rm APK_VERSION, and change versionCode calculation
2024-10-02 13:49:39 +00:00
ThomasV
7c6ff6757c plugins dialog: show description and enable buttons in the same dialog 2024-10-02 11:16:59 +02:00
ThomasV
cc2db1544f plugins.json: update hash 2024-10-02 11:15:40 +02:00
SomberNight
c96ac892c3 version.py: rm APK_VERSION
related: https://github.com/spesmilo/electrum/issues/9210#issuecomment-2376572832
2024-09-30 16:08:18 +00:00
ThomasV
b7a9e4cf7e load_external_plugins: fix config variable name 2024-09-27 14:14:03 +02:00
SomberNight
f2c96ca587 transaction.sign: (trivial) nicer log line 2024-09-26 15:09:19 +00:00
SomberNight
9b1ccb9978 android: add comment that OS push notifications are broken 2024-09-19 16:46:07 +00:00
ThomasV
ad0b5453a3 qml: do not display success if swap failed.. 2024-09-19 13:16:32 +02:00
SomberNight
383f99796a qt gui: follow-up qt6: fix args for QWidget.setFocus()
Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\main_window.py", line 1797, in toggle_search
    self.search_box.setFocus(1)
TypeError: arguments did not match any overloaded call:
  setFocus(self): too many arguments
  setFocus(self, reason: Qt.FocusReason): argument 1 has unexpected type 'int'
2024-09-18 17:39:46 +00:00
ghost43
1e03b4668a Merge pull request #9205 from accumulator/issue9204
qml: add seed passphrase property to QEWallet, show in WalletDetails
2024-09-18 16:16:09 +00:00
Sander van Grieken
0d7ff8635b qml: add seed passphrase property to QEWallet, show in WalletDetails 2024-09-18 18:00:44 +02:00
SomberNight
e8450f014e qt gui: default to QT_QPA_PLATFORM=xcb for AppImage
The wayland plugin would require at least debian 12 (or ubuntu 22.04) at runtime.

see https://github.com/spesmilo/electrum/pull/9189#pullrequestreview-2309983943 :

> I've now tried running the appimage on debian 10 (oldoldstable), and am getting an error with wayland.
>
> ```
>   4.16 | D | util.profiler | Plugins.__init__ 0.0422 sec
>   4.16 | I | daemon.Daemon | launching GUI: qt
>   4.76 | I | gui.qt.ElectrumGui | Qt GUI starting up... Qt=6.7.1, PyQt=6.7.1
> /tmp/.mount_electrFlGFOt/usr/bin/python3: symbol lookup error: /tmp/.mount_electrFlGFOt/usr/lib/python3.11/site-packages/PyQt6/Qt6/plugins/platforms/../../lib/libQt6WaylandClient.so.6: undefined symbol: wl_proxy_marshal_flags
> ```
>
> If I explicitly specify `QT_QPA_PLATFORM=xcb`, it starts and works as expected. But it picks wayland by default.
> I found https://bugreports.qt.io/browse/QTBUG-114635 and it looks like even debian 11 might be affected.
2024-09-18 15:48:57 +00:00
SomberNight
e05d2a5dbe qt gui: clean-up QCheckBox.stateChanged handling
Some checkboxes, e.g. main_window.warn_if_testnet became buggy with pyqt6:
looks like the stateChanged signal passes an int, not a Qt.CheckState.
(and note that Qt.CheckState is an Enum, not an IntEnum).
So `x == Qt.CheckState.Checked` would always evaluate to False.

```
def on_cb(_x):
    print(f"heyheyhey. {_x=!r}, {Qt.CheckState.Checked=!r}, {cb.checkState()=!r}, {cb.isChecked()=!r}")
cb = QCheckBox("")
cb.stateChanged.connect(on_cb)
```

heyheyhey. x=2, Qt.CheckState.Checked=<CheckState.Checked: 2>, cb.checkState()=<CheckState.Checked: 2>, cb.isChecked()=True
heyheyhey. x=0, Qt.CheckState.Checked=<CheckState.Checked: 2>, cb.checkState()=<CheckState.Unchecked: 0>, cb.isChecked()=False
2024-09-18 15:48:54 +00:00
SomberNight
1ee6361c7e qt gui: qt6 migration follow-ups 2024-09-18 15:48:50 +00:00
SomberNight
d791e3a9c8 qt gui: fix: qt6 segfaults on macOS if we add a menu item named "About"
macOS reserves the "About" menu item name, similarly to "Preferences" (see a few lines above).
The "About" keyword seems even more strictly locked down:
not allowed as either a prefix or a suffix.
- With Qt5, a matching menu item is simply auto-recognised as the special "About" item,
- but with Qt6, it seems we explicitly have to do this dance, as directly adding
  a menu item with the "About" name results in a segfault...
2024-09-18 15:48:46 +00:00
SomberNight
cfe8502f96 qt desktop gui: upgrade qt5->qt6
closes https://github.com/spesmilo/electrum/issues/8007
2024-09-18 15:48:38 +00:00
SomberNight
c3e0457d1c Merge branch 'pr/9190': revealer plugin: update Source Sans Pro font
see https://github.com/spesmilo/electrum/pull/9190
2024-09-18 15:25:30 +00:00
Soren Stoutner
815e18302d revealer plugin: move font initialisation to earlier
Co-authored-by: SomberNight <somber.night@protonmail.com>
2024-09-18 15:11:30 +00:00
Sander van Grieken
44c0e583d6 qml: SweepDialog 2024-09-17 16:43:38 +02:00
ghost43
ba3935c842 Merge pull request #9201 from accumulator/sweep_privkey_fixes
qt: fix scanning multi (privkeys, addresses) from QR.
2024-09-17 13:33:42 +00:00