1
0
Commit Graph

16762 Commits

Author SHA1 Message Date
Sander van Grieken
786eab9cfd wizard: cleanup, variable naming consistency, imports, invalid accept handler now raises 2023-09-20 14:34:30 +02:00
Sander van Grieken
39f34fd7d1 implement first batch of pages for wallet wizard 2023-09-20 14:34:30 +02:00
Sander van Grieken
1440eab5bf qt wizardcomponent receives qeabstractwizard instance 2023-09-20 14:34:30 +02:00
Sander van Grieken
d651220685 extract proxy and server widgets 2023-09-20 14:34:30 +02:00
Sander van Grieken
9e096fbf1e wizard: remove view from is_last_view call, it's never used 2023-09-20 14:34:30 +02:00
Sander van Grieken
8f0cb38af2 qt: add initial wizard classes for desktop client 2023-09-20 14:34:30 +02:00
ThomasV
d7beb109b8 lnworker: separate add_peer from _open_channel_coroutine 2023-09-19 09:45:56 +02:00
ThomasV
4d68025cca maybe_forward_htlc: detect invalid onion before temporary chan failures 2023-09-19 09:44:06 +02:00
accumulator
7439ecdb39 bip39: add likely script vs derivation path mistakes for BIP49 and BIP84 paths (#8615)
See e.g. https://bitcointalk.org/index.php?topic=5454270.0
2023-09-18 16:52:38 +00:00
Sander van Grieken
3e12d92a41 flake: remove whitespace 2023-09-18 18:03:31 +02:00
ThomasV
b0ff95d7c5 Merge pull request #8619 from SomberNight/202309_config_tooltips
config: move tooltips from Qt gui into configvars
2023-09-18 17:31:48 +02:00
ThomasV
1545f47b97 Merge pull request #8618 from accumulator/fix_swap_cancel_race
submarine swaps: register hold invoice early in wait_for_htlcs_and_br…
2023-09-18 17:05:40 +02:00
Sander van Grieken
8dbddedd30 submarine swaps: register hold invoice early in wait_for_htlcs_and_broadcast, so a SwapManager.cancel_normal_swap() does not race.
cancel_normal_swap unregisters the hold invoice, which can occur before register_hold_invoice in wait_for_htlcs_and_broadcast
if the network call has not returned yet.
2023-09-18 16:58:04 +02:00
Sander van Grieken
bbfe5225b6 qml: port cancel normal swap feature from desktop client 2023-09-18 16:13:32 +02:00
SomberNight
357ae985cc config: move tooltips from Qt gui into configvars 2023-09-18 13:54:48 +00:00
SomberNight
f58387eaa8 qt settings_dialog: rm unused coinchooser selection 2023-09-18 11:48:02 +00:00
ThomasV
cffbe44c07 lnworker: get_channel_by_short_id to use remote scid_alias
This is needed when forwarding payments
2023-09-17 11:12:23 +02:00
ThomasV
375f96f7fa remove lnworker.get_channel_by_scid (redundant) 2023-09-17 11:06:25 +02:00
ThomasV
6cd42faa68 QML: show onchain and offchain amounts for groups in txdetails 2023-09-16 15:42:16 +02:00
ThomasV
7eabbbc81f Move history grouping logic from qt GUI to wallet.get_full_history()
Tx groups are now rendered similarly on all GUIs.
2023-09-16 15:39:32 +02:00
ThomasV
c27e6de975 Merge pull request #8616 from SomberNight/202309_dont_sign_tx_with_dummy_addr
add sanity checks we don't sign tx including dummy addr
2023-09-16 15:02:36 +02:00
ThomasV
59aa7611dd add group_id to swap refund transactions, so that the GUI shows them as part of the swap tx group 2023-09-16 11:09:39 +02:00
ThomasV
ea79562b7a submarine swaps: remove expired swaps from the list, and log the reason for failing a swap. 2023-09-16 10:21:08 +02:00
SomberNight
4c63d8729b add sanity checks we don't sign tx including dummy addr
Somewhat a follow-up to 649ce979ab.

This adds some safety belts so we don't accidentally sign a tx that
contains a dummy address.
Specifically we check that tx does not contain output for dummy addr:
- in wallet.sign_transaction
- in network.broadcast_transaction

The second one is perhaps redundant, but I think it does not hurt.
2023-09-16 04:36:08 +00:00
SomberNight
956b455954 qt tx dlg: follow-up "send tx change to lightning"
lnworker is None if lightning is disabled.
follow-up 649ce979ab

```
 15.14 | E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\rate_limiter.py", line 231, in wrapper
    return RateLimiter.invoke(rate, ts_after, func, args, kwargs)
  File "...\electrum\electrum\gui\qt\rate_limiter.py", line 79, in invoke
    return rl._invoke(args, kwargs)
  File "...\electrum\electrum\gui\qt\rate_limiter.py", line 91, in _invoke
    return self._doIt()
  File "...\electrum\electrum\gui\qt\rate_limiter.py", line 120, in _doIt
    retval = self.func(*args, **kwargs) # and.. call the function. use latest invocation's args
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 745, in _throttled_update
    self.update()
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 750, in update
    self.io_widget.update(self.tx)
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 243, in update
    insert_tx_io(
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 205, in insert_tx_io
    tcf_addr = addr_text_format(addr)
  File "...\electrum\electrum\gui\qt\transaction_dialog.py", line 173, in addr_text_format
    sm = self.wallet.lnworker.swap_manager
AttributeError: 'NoneType' object has no attribute 'swap_manager'
```
2023-09-16 02:21:23 +00:00
ThomasV
3bc9ead67b submarine swaps: use password stored in memory. fixes #8612 2023-09-15 16:01:13 +02:00
ThomasV
9eb448ffe0 follow-up previous commit 2023-09-15 15:54:25 +02:00
ThomasV
4e80ef818d Add unlock command to CLI (stores wallet password in memory) 2023-09-15 15:37:53 +02:00
Sander van Grieken
24f27618e2 qml: handle no wallet password for authed info 2023-09-15 11:42:49 +02:00
ThomasV
1e96bbc1e8 fix typo (follow-up previous commit) 2023-09-14 16:05:36 +02:00
ThomasV
d03c77837f Let the GUI compute the balance displayed in history.
Since Qt groups swap transactions, the displayed balance
was sometimes incorrect.
2023-09-14 15:58:58 +02:00
ThomasV
9df8bb61a5 Give users an option to cancel a submarine swap while awaiting HTLCs.
Note that HTLCs must not be cancelled after the funding transaction
has been broadcast. If one want to cancel a swap once the funding
transaction is in mempool, one should double spend the transaction.
2023-09-13 16:28:31 +02:00
Sander van Grieken
58dbe6690d qml: create ElCombBox and ElRadioButton that automatically word wrap their text element. Fixes #8611 2023-09-12 17:56:35 +02:00
SomberNight
139eb632d7 (trivial) follow-up paysession.use_two_trampolines arg change
follow-up b2053c68f1

- use_two_trampolines is already passed as arg to init
- strings in gui/messages.py should not end with a newline
2023-09-12 14:05:12 +00:00
SomberNight
6819f685d7 tests: add tests for "recv mpp confusion" bug
see https://github.com/spesmilo/electrum/security/advisories/GHSA-8r85-vp7r-hjxf
2023-09-12 13:58:57 +00:00
SomberNight
2746a9d93f lnchannel: replace assert htlc.payment_hash==sha256(preimage) w/ exc
asserts should not be used for security checks
2023-09-12 13:30:48 +00:00
SomberNight
9dff412017 release notes: add links to security disclosures 2023-09-12 12:37:50 +00:00
ThomasV
aade0e8ef9 disable option SEND_CHANGE_TO_LIGHTNING if we are already doing a swap 2023-09-11 10:46:37 +02:00
ThomasV
649ce979ab send tx change to lightning 2023-09-09 14:14:43 +02:00
ThomasV
f245b347f1 Merge pull request #8609 from SomberNight/202309_getconfig_default_value
getconfig/setconfig to use configvars
2023-09-08 19:06:25 +02:00
SomberNight
b3514672d6 run_electrum: small clean-up in init_cmdline 2023-09-08 15:46:06 +00:00
SomberNight
87f5df1e8b config: add sanity check for duplicate config keys 2023-09-08 15:11:59 +00:00
SomberNight
8c9fec4ab8 commands: getconfig to use default values, add existence checks
- getconfig and setconfig now both check configvars for existence
- getconfig returns default values when applicable
- setconfig does not side-step type-checks for values

fixes https://github.com/spesmilo/electrum/issues/8607
closes https://github.com/spesmilo/electrum/pull/8608
2023-09-08 15:11:55 +00:00
SomberNight
552bfb589a plugins: split load_plugins() 2023-09-08 14:48:36 +00:00
ThomasV
136978e9d0 submarine swaps: fail received HTLCs of normal swap htlcs if
the swap is still unfunded and the refund delay has expired.
2023-09-08 16:38:08 +02:00
SomberNight
b0e18d8f8e remove remnants of config SSL options
follow-up 012ce1c1bb
2023-09-08 11:34:34 +00:00
ThomasV
bee19d7dec remove dumpgraph and inject_fees from cli
Those commands were only used for testing.

inject_fees was particularly misleading, because an electrum
instance with an active network connection regularly updates
its fees, thus voiding the effecct of that command.
2023-09-08 11:53:41 +02:00
SomberNight
6a2806c2c5 simple_config: implement complex default values
Besides a literal value, the default can now also be a callable,
which gets called with the config and evaluated as needed, lazily.

This potentially allows e.g. the default value of one configvar to
depend on the current value of another configvar.
2023-09-07 15:30:46 +00:00
SomberNight
201309a7f0 ledger plugin: fix Ledger_Client.construct_new on very old btc app ver
related: https://github.com/spesmilo/electrum/issues/8568#issuecomment-1710162955
2023-09-07 14:47:55 +00:00
SomberNight
64ba3bd017 (trivial) do not use old-style (%) formatting inside translations
see f29cd810e3/electrum/i18n.py (L48)
2023-09-07 13:25:35 +00:00