1
0
Commit Graph

18660 Commits

Author SHA1 Message Date
SomberNight
44f3444795 lnworker: make "preimages" dict private
I want to hook into lnworker.save_preimage (not done yet).
Other modules should not put preimages into the dict directly.
2025-05-14 13:23:02 +00:00
Sander van Grieken
4c88836389 qt: don't show request details when multiple requests are selected in request_list 2025-05-14 14:45:14 +02:00
ThomasV
37352ea5a9 Merge pull request #9823 from f321x/psbt_nostr_verify_authors
fix: verify author pubkey of psbt nostr events
2025-05-14 13:12:25 +02:00
Sander van Grieken
a9213c4d66 psbt_nostr: send label along with PSBT 2025-05-14 12:49:33 +02:00
Sander van Grieken
6566f2f0a4 qt: pass Invoice object to transaction dialog when appropriate.
This is purely informational and optional, with the main immediate use to provide the
invoice description/message/label to the transaction dialog, so it can be stored
when saving the tx in history, or passed along with PSBTs sent to cosigners.

Before, the tx description was not saved in history when an invoice was not saved before
signing and saving the tx for sending later.
2025-05-14 12:49:33 +02:00
Sander van Grieken
f535817006 psbt_nostr: qml: don't let iterator overwrite param 2025-05-14 12:48:47 +02:00
f321x
759022d3ff fix: verify author pubkey of psbt nostr events
Checks if the pubkey of the author sending the psbt cosigning
request is in our list of cosigner pubkeys to prevent accepting
"fake" requests from other pubkeys.
2025-05-14 11:28:11 +02:00
Sander van Grieken
a45ca41268 qml: fix storing override amount too soon, while user is allowed to set a new override amount which was silently ignored.
lightning: implicit save of lightning invoice with override amount deferred until actual payment is accepted.
on-chain: for now, invoice is implicitly saved when override amount is passed to ConfirmTxDialog. (this is sooner
than current desktop client, which saves - and only saves - when Pay is clicked from ConfirmTxDialog)
2025-05-14 10:57:57 +02:00
SomberNight
1b031d432e qt tx dialog: allow clicking into the future. wheeee
- "outpoints" for inputs were already clickable to open the funding tx
- now "outpoints" for outputs are also clickable to open the spending tx
2025-05-13 18:30:20 +00:00
accumulator
2947de23da Merge pull request #9820 from f321x/qml_terms_of_use
qml: add terms of use to setup wizard
2025-05-13 15:54:34 +02:00
f321x
adaafeaae1 disable proxy checkbox in ProxyConfig by default
disable the checkbox by default, so that if a user selects Enable Proxy
in the advanced network settings, and then just clicks next with the proxy
checkbox set, doesn't end up with a invalid proxy configuration which
doesn't connect to the server and has to be fixed manually.
2025-05-13 14:28:22 +02:00
f321x
38f51a3b13 qml: add terms of use to setup wizard 2025-05-13 14:28:13 +02:00
ThomasV
6d939a0ee6 add LIGHTNING_MAX_HTLC_VALUE_IN_FLIGHT_MSAT to config
This allows to reproduce #9700 using two electrum instances
2025-05-13 13:07:00 +02:00
ThomasV
aff7243f06 qt wizard server_connect tweaks 2025-05-13 13:05:17 +02:00
ThomasV
b1623431aa Merge pull request #9821 from f321x/qt_network_tab_move_sentence
followup: qt terms of use, move label in network tab
2025-05-13 12:53:58 +02:00
f321x
e9a1357a99 followup: qt terms of use, move label in network tab
moves 2nd sentence in network tab below the checkboxes and adds a bit of
spacing below the electrum logo in the Terms of Use tab.
2025-05-13 12:12:15 +02:00
ThomasV
660ffa2b8f fix test_txbatcher (follow-up 6e3f173a71) 2025-05-13 09:09:35 +02:00
ThomasV
6e3f173a71 SweepInfo: define csv_delay as property 2025-05-13 08:50:33 +02:00
SomberNight
2ce72d3cab formatting: rm unicode BOM from gui/fonts/PTMono.LICENSE 2025-05-12 18:19:54 +00:00
ThomasV
0607a406ce Qt: add closing warning if we have an unconfirmed local commitment tx with htlcs
add htlc direction (offered, received) to the htlc sweep_info name
regtest: add test_reedeem_received_htlcs
2025-05-12 15:48:20 +02:00
ThomasV
7d6c21f233 txbatcher: fix wanted_height shown in GUI
if an input has both CSV and CLTV, we must display the highest value
2025-05-12 13:46:27 +02:00
ThomasV
8c31ed648a simplify default label of tx 2025-05-12 13:46:27 +02:00
ThomasV
a1db855c63 Merge pull request #9819 from f321x/fix_tui_crash
fix: text gui exceptions and and type errors
2025-05-12 13:18:13 +02:00
ThomasV
148518a1f2 txbatcher: sanity check csv_delay
follow-up 8319a855a9
2025-05-12 13:04:30 +02:00
ThomasV
8319a855a9 fix csv_delay for htlcs in sweep_our_ctx 2025-05-12 12:38:07 +02:00
f321x
5bfddad67c use daemon.load_wallet instead of constructing manually 2025-05-12 10:53:12 +02:00
f321x
6e21dac387 fix: tui contacts edit label and delete button
the edit label button did crash the application because get_string
returned bytes instead of a string. The delete button was not
implemented but shown in the tui.
2025-05-12 10:51:19 +02:00
ThomasV
e54d57bf73 Qt: improve closing warnings for submarine swaps 2025-05-12 10:21:46 +02:00
f321x
bfe895fc3e remove unused imports, fix type hint 2025-05-12 10:17:30 +02:00
f321x
b0fd126e1b fix: exception if payment amount is not set
if payment amount is not set and the user tried to pay, the application
would crash. This shows a message instead. Also uses show_message
instead of show_error, as show_error doesn't exist.
2025-05-12 10:08:52 +02:00
f321x
02232b227e fix IndexError if self.channel_ids is empty 2025-05-12 10:00:38 +02:00
SomberNight
96f861a570 ci: add linter task "ban unicode" to protect against malicious unicode
This script scans the whole codebase for unicode characters and
errors if it finds any, unless the character is specifically whitelisted.

The motivation is to protect against homoglyph attacks, invisible unicode characters,
bidirectional and other control characters, and other malicious unicode usage.

Given that we mostly expect to use ASCII characters in the source code,
the most robust and generic fix seems to be to just ban all unicode usage.

see https://trojansource.codes/ :
> Compilers, interpreters, and build pipelines supporting Unicode should throw errors or warnings
> for unterminated bidirectional control characters in comments or string literals,
> and for identifiers with mixed-script confusable characters.
> Language specifications should formally disallow unterminated bidirectional
> control characters in comments and string literals.
> Code editors and repository frontends should make bidirectional control characters
> and mixed-script confusable characters perceptible with visual symbols or warnings.

also https://github.com/maltfield/detect-malicious-unicode
2025-05-09 18:03:25 +00:00
f321x
41b8b16a7c add hold invoice cli functionality 2025-05-09 18:48:05 +02:00
f321x
abc50a97e1 plugins: add functionality to allow setting plugin pubkey from gui
Adds functionality that allows the user to store the plugin authorization pubkey without having to edit files/registry manually.
On Linux systems it spawns the commands in a subprocess with pkexec which will trigger a OS prompt to execute the commands as root.
The user sees the executed commands and can either authorize with the root password or decline.
On windows it uses the windows `ShellExecuteExW` api to edit the registry, this also triggers a OS dialog to accept or decline (UAC dialog).
There is also functionality to reset the key again, which works in the same way.
2025-05-09 13:34:09 +02:00
accumulator
05e395018c Merge pull request #9782 from f321x/fix_qr_input_from_file
qt: add qr reading from file to ScanQRTextEdit and SendTab
2025-05-09 11:50:04 +02:00
SomberNight
351cc6abd9 Revert "interface: add padding and some noise to protocol messages"
Unforeseen issues. Needs more work..

This reverts commit 097eabed1f.
2025-05-08 18:34:07 +00:00
ThomasV
02914e444a txbatcher: add_info_from_wallet in _new_base_tx
37.23 | E | txbatcher.TxBatch | TxBatch error: AttributeError("'TxOutput' object has no attribute 'is_change'")
Traceback (most recent call last):
  File "/opt/electrum/electrum/txbatcher.py", line 248, in run
    await self.run_iteration()
  File "/opt/electrum/electrum/txbatcher.py", line 379, in run_iteration
    base_tx = self.find_base_tx()
  File "/opt/electrum/electrum/txbatcher.py", line 369, in find_base_tx
    self._new_base_tx(tx)
  File "/opt/electrum/electrum/json_db.py", line 48, in wrapper
    return func(self, *args, **kwargs)
  File "/opt/electrum/electrum/txbatcher.py", line 518, in _new_base_tx
    if tx.has_change():
  File "/opt/electrum/electrum/transaction.py", line 1276, in has_change
    return len(self.get_change_outputs()) > 0
  File "/opt/electrum/electrum/transaction.py", line 1273, in get_change_outputs
    return  [o for o in self._outputs if o.is_change]
  File "/opt/electrum/electrum/transaction.py", line 1273, in <listcomp>
    return  [o for o in self._outputs if o.is_change]
AttributeError: 'TxOutput' object has no attribute 'is_change'
2025-05-08 19:34:51 +02:00
SomberNight
097eabed1f interface: add padding and some noise to protocol messages
basic countermeasures against traffic analysis
2025-05-08 14:35:44 +00:00
SomberNight
2600a3bc74 requirements: bump max aiorpcx
and bump pinned aiorpcx and electrum-aionostr
2025-05-08 14:31:11 +00:00
SomberNight
c75b10fe69 requirements: add upper bounds for electrum_ecc and electrum_aionostr 2025-05-08 13:33:16 +00:00
ThomasV
db271d9b7d Fix get_pending_swaps: use both funding and spending tx heights
Also, do not show closing warnings if we are offline.
2025-05-08 14:58:13 +02:00
ThomasV
2b68f65aac fix typo 2025-05-08 09:34:48 +02:00
ThomasV
061460611c Merge pull request #9795 from f321x/followup_tos_qt
followup: qt terms of use scrollbar and regtest mode
2025-05-07 19:33:05 +02:00
f321x
39901c8872 fix: enable Agree button if scrollbar is not visible 2025-05-07 17:33:19 +02:00
ThomasV
9a61640243 move question text 2025-05-07 17:23:33 +02:00
f321x
c54f75b31f don't show ToU in regtest mode 2025-05-07 17:19:30 +02:00
ThomasV
45c7180536 Merge pull request #9715 from f321x/warning_on_close
gui: Add option to show warnings on wallet close, add warning for swaps
2025-05-07 17:17:59 +02:00
f321x
913f5ec6d8 add option to show warnings on wallet close, add warning for ongoing submarine swap 2025-05-07 17:11:08 +02:00
SomberNight
151b64da84 wizard: "terms of use": add version number
follow-up https://github.com/spesmilo/electrum/pull/9794
2025-05-07 13:59:00 +00:00
ThomasV
5300088ef8 Merge pull request #9794 from f321x/terms_of_use_separate
qt: show terms of use as first window on setup
2025-05-07 14:03:34 +02:00