1
0
Commit Graph

17752 Commits

Author SHA1 Message Date
SomberNight
571acf71fe android: update p4a ref
- to include 0ab0d872e6
  > recipes: add patches for python3 recipes, for reproducible .pyc generation
  This should fix build repro of the apk.
2024-10-15 23:37:57 +00:00
Sander van Grieken
b8f12abfe4 qml: sweep: properly wrap text 2024-10-15 11:54:08 +02:00
ThomasV
267df91c0b send tab: catch exception raised if swap server is unreachable,
show error to the user.
(similar to main_window.run_swap_dialog)
2024-10-14 18:40:15 +02:00
SomberNight
e442a738e7 update block header checkpoints 2024-10-14 16:38:16 +00:00
ThomasV
8f11b5d411 swapserver: rm hardcoded value for percentage 2024-10-14 13:35:31 +02:00
Sander van Grieken
b22fb329cc coldcard: small fixes 2024-10-14 12:04:37 +02:00
accumulator
f7d3a850ba Merge pull request #9237 from accumulator/fix_2fa_keystore_only_encryption
trustedcoin: fix continuation of 2fa wallet file with keystore-only encryption
2024-10-14 11:50:18 +02:00
accumulator
5aa0d52121 Merge pull request #9248 from accumulator/issue7682_and_cc_bugs
coldcard: rebase #7682 and fix CC bugs
2024-10-14 11:43:30 +02:00
accumulator
d19f1f4790 Merge pull request #9245 from accumulator/qt_refactor_layouts_to_widgets
qt: refactor SeedLayout/KeysLayout to SeedWidget/KeysWidget, remove t…
2024-10-14 11:42:27 +02:00
Sander van Grieken
9e1c1bd0ad trustedcoin: fix continuation of 2fa wallet file with keystore-only encryption 2024-10-14 11:32:15 +02:00
ThomasV
3f85c7132a swapserver: add config variable SWAPSERVER_FEE_MILLIONTHS 2024-10-14 10:23:03 +02:00
ThomasV
5928dbbc47 qt normal swap dialog: do not use run_from_another_thread, as it is blocking 2024-10-13 09:53:14 +02:00
ThomasV
92d566f50e normal swaps message: put TLDR at the beginning! 2024-10-13 09:52:11 +02:00
avirgovi
572252abcd coldcard: rebase #7682 and fix CC bugs 2024-10-12 09:23:02 +02:00
SomberNight
ffdd45ee6f crypto: (trivial) add some type-hints 2024-10-12 03:51:59 +00:00
accumulator
106a1aca60 Merge pull request #9246 from accumulator/cosigner_pool_ecc
plugin: cosigner_pool: refactor to ecies_encrypt_message, ecies_decrypt_message
2024-10-11 23:14:24 +02:00
SomberNight
395618723b qt: tray icon: don't show "network" if --offline 2024-10-11 18:48:49 +00:00
SomberNight
8d79726ec5 tests: rm some ecc tests (moved to electrum-ecc)
see cd6bb9beb9
2024-10-11 18:46:30 +00:00
Sander van Grieken
a9751765e2 plugin: cosigner_pool: refactor to ecies_encrypt_message, ecies_decrypt_message 2024-10-11 17:27:50 +02:00
SomberNight
225ed079a9 hw plugins: ledger: bump pinned lib to 0.3.0, raise max_lib to <0.4
closes https://github.com/spesmilo/electrum/issues/9035
2024-10-11 15:13:34 +00:00
Sander van Grieken
97a7136b5f qt: refactor SeedLayout/KeysLayout to SeedWidget/KeysWidget, remove the hacks left over from old to new wizard and
update validation in all cases (e.g. validate electrum seed when switching from bip39 to electrum in options dialog)
2024-10-11 17:08:33 +02:00
ThomasV
4ec3b7f344 find_external_plugins: fix for python versions < 3.10 2024-10-11 11:26:33 +02:00
SomberNight
214e04d4bb hw plugins: cmdline: fix offline commands for encrypted hw wallets
```
$ ./run_electrum --testnet signmessage -w /home/user/.electrum/testnet/wallets/test_trezor_white_bip84 tb1q5pguna9y2g9y2gsu8r8gmxeye2cefvyly8dg02 heyheyhey -o
  0.84 | W | plugins.jade.jadepy.jade | No module named 'electrum.plugins.jade.jadepy.jade_ble'
  0.84 | W | plugins.jade.jadepy.jade | BLE scanning/connectivity will not be available
  3.73 | E | __main__ | error running command (without daemon)
Traceback (most recent call last):
  File "/home/user/wspace/electrum/electrum/plugins/trezor/clientbase.py", line 151, in get_xpub
    node = trezorlib.btc.get_public_node(self.client, address_n).node
  File "/home/user/.local/lib/python3.10/site-packages/trezorlib/tools.py", line 274, in wrapped_f
    ret = f(*args, **kwargs)
  File "/home/user/.local/lib/python3.10/site-packages/trezorlib/btc.py", line 125, in get_public_node
    return client.call(
  File "/home/user/.local/lib/python3.10/site-packages/trezorlib/tools.py", line 297, in wrapped_f
    return f(client, *args, **kwargs)
  File "/home/user/.local/lib/python3.10/site-packages/trezorlib/client.py", line 260, in call
    resp = self._callback_pin(resp)
  File "/home/user/.local/lib/python3.10/site-packages/trezorlib/client.py", line 186, in _callback_pin
    pin = self.ui.get_pin(msg.type)
  File "/home/user/wspace/electrum/electrum/plugins/trezor/clientbase.py", line 308, in get_pin
    pin = self.handler.get_pin(msg.format(self.device), show_strength=show_strength)
AttributeError: 'NoneType' object has no attribute 'get_pin'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/wspace/electrum/./run_electrum", line 540, in handle_cmd
    result = fut.result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/home/user/wspace/electrum/./run_electrum", line 227, in run_offline_command
    password = get_password_for_hw_device_encrypted_storage(plugins)
  File "/home/user/wspace/electrum/./run_electrum", line 212, in get_password_for_hw_device_encrypted_storage
    return client.get_password_for_storage_encryption()
  File "/home/user/wspace/electrum/electrum/plugin.py", line 523, in wrapper
    return run_in_hwd_thread(partial(func, *args, **kwargs))
  File "/home/user/wspace/electrum/electrum/plugin.py", line 516, in run_in_hwd_thread
    return fut.result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 458, in result
    return self.__get_result()
  File "/usr/lib/python3.10/concurrent/futures/_base.py", line 403, in __get_result
    raise self._exception
  File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/user/wspace/electrum/electrum/plugins/hw_wallet/plugin.py", line 260, in get_password_for_storage_encryption
    xpub = self.get_xpub(derivation, "standard")
  File "/home/user/wspace/electrum/electrum/plugin.py", line 523, in wrapper
    return run_in_hwd_thread(partial(func, *args, **kwargs))
  File "/home/user/wspace/electrum/electrum/plugin.py", line 513, in run_in_hwd_thread
    return func()
  File "/home/user/wspace/electrum/electrum/plugins/trezor/clientbase.py", line 150, in get_xpub
    with self.run_flow(creating_wallet=creating):
  File "/home/user/wspace/electrum/electrum/plugins/trezor/clientbase.py", line 89, in __exit__
    self.end_flow()
  File "/home/user/wspace/electrum/electrum/plugins/trezor/clientbase.py", line 82, in end_flow
    self.handler.finished()
AttributeError: 'NoneType' object has no attribute 'finished'
```
2024-10-10 21:25:34 +00:00
SomberNight
dd46808549 hw plugins: cmdline: support numpad for trezor one PIN codes 2024-10-10 21:10:07 +00:00
SomberNight
979e6931da Merge branch '202410_trezor_pinmatrix'
- include a copy of pinmatrix.py from python-trezor, as-is
- adapt that to qt6: the upstream version(s) only support qt4/qt5
- use it in trezor/keepkey/safet plugins
2024-10-10 20:26:58 +00:00
SomberNight
ecf0a5854d hw plugins: adapt trezor_qt_pinmatrix.py to qt6
This fixes the pinmatrix dialog (used by trezor one, keepkey, safet),
which was previously segfaulting.

follow-up https://github.com/spesmilo/electrum/pull/9189
2024-10-10 20:24:09 +00:00
SomberNight
5d988af18d hw plugins: include a copy of pinmatrix.py from python-trezor, as-is
3f1d2059ca/python/src/trezorlib/qt/pinmatrix.py

I will use this in the trezor (and clones) plugins in a modified form to work with qt6.
Otherwise we would have to ask the trezor devs, who would actually respond,
but also the keepkey and safet lib authors, who would not... to support qt6.
2024-10-10 20:15:19 +00:00
SomberNight
15d5b96dda hw plugins: ledger: minor fix re qt6 migration
follow-up https://github.com/spesmilo/electrum/pull/9189
2024-10-10 20:12:09 +00:00
SomberNight
48661b5913 follow-up electrum_ecc: fix some import names
ref https://github.com/spesmilo/electrum/pull/9234
2024-10-10 19:24:27 +00:00
SomberNight
071150f465 android: update p4a ref
- to include d4432ec8d0
    see https://github.com/spesmilo/electrum/issues/9215#issuecomment-2403072217
- and add a fixme to revisit apkdiff re horrors beyond my comprehension
2024-10-10 18:39:42 +00:00
ghost43
7328e458e0 Merge pull request #9234 from SomberNight/202410_use_electrum_ecc
use `electrum_ecc` package
2024-10-10 16:28:39 +00:00
SomberNight
581082d5bb updates READMEs re electrum-ecc 2024-10-10 15:46:21 +00:00
SomberNight
f35437f03c build: set ELECTRUM_ECC_DONT_COMPILE=1, instead manually build lib
Haven't checked if electrum-ecc compiles libsecp reproducibly.
For now let's just keep the old flow.
(but if we spent time on making that compilation reproducible,
the appimage and the macos builds could use it directly)
2024-10-10 15:46:18 +00:00
SomberNight
3d7f3355cb ci: libsecp build: follow-up prev 2024-10-10 15:46:10 +00:00
ThomasV
9dbbd815a3 build scripts: add libsecp256k1 library to the electrum_ecc directory 2024-10-10 15:46:07 +00:00
ThomasV
acb4e00a38 add electrum_ecc to contrib/deterministic-build/requirements.txt
note: Manual edit. Not running freeze_packages because some
existing packages now require hatchling to build
2024-10-10 15:46:04 +00:00
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