1
0
Commit Graph

14416 Commits

Author SHA1 Message Date
SomberNight
58be69afd3 commands: add "encrypt_file" arg to "password" command 2022-05-26 21:41:29 +02:00
SomberNight
d04e3c7288 bip70 paymentrequest: remove support for "file" URIs 2022-05-26 19:50:47 +02:00
SomberNight
b7a3e07db8 bump version to 4.3.0a0 2022-05-26 19:10:29 +02:00
SomberNight
189390fb2d qt new_channel_dialog: use lnutil.MIN_FUNDING_SAT instead of ad-hoc val 2022-05-26 18:08:15 +02:00
SomberNight
ad42de03ac qt new_channel_dialog: fix regression: oepn chan with "max" amt
```
E | gui.qt.exception_window.Exception_Hook | exception caught by crash reporter
Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\channels_list.py", line 377, in new_channel_with_warning
	self.new_channel_dialog()
  File "...\electrum\electrum\gui\qt\channels_list.py", line 399, in new_channel_dialog
	return d.run()
  File "...\electrum\electrum\gui\qt\new_channel_dialog.py", line 133, in run
	if self.min_amount_sat and funding_sat < self.min_amount_sat:
TypeError: '<' not supported between instances of 'str' and 'int'
```
2022-05-26 18:05:18 +02:00
ThomasV
30a98578c8 Refactor: move calls to lnworker methods out of the tx creation functions
(follow-up f0237e46be)
2022-05-26 15:04:43 +02:00
ThomasV
f0237e46be lnsweep: do not redeem offered HTLCs unless payment was received in full 2022-05-26 14:28:25 +02:00
ThomasV
672326bd12 lnwatcher: a bit less verbose 2022-05-26 12:00:11 +02:00
ThomasV
035c877813 channels_list: do not add extra whitespaces when displaying amounts in HTLCs 2022-05-26 09:04:46 +02:00
SomberNight
79578d6c18 lnchannel: fix diagnostic_name, for better log lines
Previously nothing re channel id was logged, as "diagnostic_name" is only evaluated once,
and it ran before channel_id was set.
2022-05-25 23:51:11 +02:00
ThomasV
58194ce78b Merge pull request #7830 from SomberNight/202205_lnpeer_reestablish_channel
lnpeer.reestablish_chan: enforce order of replaying commitsig/revack
2022-05-25 19:54:51 +02:00
SomberNight
ef4477a930 lnpeer.reestablish_chan: enforce order of replaying commitsig/revack
When replaying messages during channel-reestablishment,
previously we first resent all update messages, along with potential commitment_signed messages,
and then we potentially resent a single revoke_and_ack.

This can result in incorrect behaviour in case both a commitment_signed and a revoke_and_ack needs to be resent.
When replaying messages, the relative order of commitment_signed and revoke_and_messages needs to be preserved.
(the order of updates (htlc/fee) in relation to the revack messages does not matter)

implements https://github.com/lightning/bolts/pull/810

The logic here is somewhat based on what c-lightning does:
01e5f1886e/channeld/channeld.c (L3059)
2022-05-25 19:44:44 +02:00
ThomasV
56659c550e lnwatcher: fix another broadcast-too-early error 2022-05-25 12:45:53 +02:00
ThomasV
e99a5a7703 fix lnwatcher broadcast logic, follow-up b9f01a86fe 2022-05-25 12:34:52 +02:00
ThomasV
adbabacc12 Stabilize size of receive_tabs widgets
- use SetMinimumSize instead of sizeHint
   (partially reverts 28f794b63b)
 - to deal with small window sizes, set MinimumHeight of the
   parent TabWidget (with a few extra pixels for margins)
 - add an extra layout around address_help_text, so that it has
   margins (margins were removed in 28f794b63b)
2022-05-25 10:17:39 +02:00
ThomasV
7abc7c720f receive_tabs: add tooltip to inner widgets 2022-05-24 19:30:51 +02:00
ThomasV
b9f01a86fe lnwatcher: check that parent transaction is confirmed in CSV test 2022-05-24 19:13:10 +02:00
ThomasV
5bb99ddfaf submarine_swaps: fix order of operations in get_send_amount 2022-05-24 18:51:09 +02:00
SomberNight
2362d6d010 follow-up "remove email plugin"
follow-up c67c4e95dc
2022-05-24 18:33:19 +02:00
SomberNight
28f794b63b Qt receive tab: better receive_tabs widget size for small windows
Previously the receive_tabs widget was allowed to be much smaller
than its inner main widget (e.g. truncating visible QR code).
A bit hackish to overwrite/monkeypatch sizeHint,
but I've tried a few approaches and this seems to work best.
2022-05-24 18:15:12 +02:00
ThomasV
2e120d74b8 Qt: add name to coroutines_scheduled 2022-05-24 13:39:06 +02:00
ThomasV
feb10bc67b remove unneeded parameter (follow-up e392197ab9) 2022-05-24 13:33:16 +02:00
ThomasV
3e0d7ff549 improve channels_list menus (minor) 2022-05-24 12:48:19 +02:00
ThomasV
f14c420c30 Qt: display number of tasks (window._coroutines_scheduled) in toolbar.
Disable rebalance/swap suggestions attached to requests/invoices if there is an ongoing task.
Note: This assumes that all tasks are lightning payments, which is true for the moment.
2022-05-24 12:18:32 +02:00
ThomasV
c67c4e95dc remove email plugin 2022-05-24 11:48:14 +02:00
ThomasV
bb0f4b5a65 Merge pull request #7828 from JeremyRand/is-none-bitcoin
Fix "== None" linter fails
2022-05-24 06:41:22 +02:00
Jeremy Rand
1aa444e0f8 Fix "== None" linter fails
Credit to Zoltan Konder for pointing me to this issue.
2022-05-24 02:39:11 +00:00
SomberNight
cac4b6f92c email plugin: SSL was using insecure defaults 2022-05-23 19:04:51 +02:00
SomberNight
7e77a7e1cc email plugin: (trivial) adapt to Invoices refactor 2022-05-23 18:53:19 +02:00
SomberNight
98feff07ad threading.Thread: fix some DeprecationWarnings
"DeprecationWarning: setDaemon() is deprecated, set the daemon attribute instead"
2022-05-23 17:52:39 +02:00
ThomasV
0431cd825e Allow the QR code in the receive tab to be variable size 2022-05-23 13:17:25 +02:00
ThomasV
2a31f80d09 QRCodeWidget: add margin of 1 block, remove fixedSize parameter 2022-05-23 11:38:09 +02:00
ThomasV
3b44646bd1 QRCodeWidget: show warning in GUI 2022-05-23 10:11:35 +02:00
ThomasV
155b3703ac QR window: fix tab order 2022-05-23 09:49:17 +02:00
ThomasV
50a272ec8f do not propose rebalance between channels to the same trampoline 2022-05-23 09:31:38 +02:00
ThomasV
53b4389e05 Qt: set fixed size for reveive help widgets 2022-05-23 09:20:14 +02:00
ThomasV
4cd2807563 Qt: rephrase messages, propose 'pay onchain' as the last option 2022-05-23 09:03:45 +02:00
ThomasV
5d659cda0e improve channel_funding_sat suggestion. add min_amount parameter to new_channel_dialog 2022-05-22 17:18:28 +02:00
ThomasV
e43983e854 Qt: update current request when update_tabs is called 2022-05-22 13:32:24 +02:00
ThomasV
23230c3c10 receive widget: minor improvements, more help text 2022-05-22 11:40:01 +02:00
ThomasV
0656e6d44e suggest_rebalance: special case for MPP heuristics 2022-05-22 09:22:16 +02:00
ThomasV
53151244e2 LNWorker: Add suggest_rebalance methods for sending and receiving.
These methods return a list of channels that can be rebalanced,
in order to receive or send a given amount.

Also add 'channels' parameter to submarine swaps.
Previously, swaps were not considering which channel to use.

When we do not have liquidity to pay an invoice:
 - add 'rebalance' option in order to pay an invoice
 - use the suggested channel in the 'swap' option

When we do not have the liquidity to receive an invoice:
 - add 'Rebalance' and 'Swap' buttons to the receive tab
2022-05-21 20:25:44 +02:00
SomberNight
4915db52b9 interface: fix DeprecationWarnings re SSLContext
```
...\electrum\electrum\interface.py:585: DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated.
  sslc = ssl.SSLContext()
...\electrum\electrum\interface.py:585: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
  sslc = ssl.SSLContext()
```
2022-05-21 18:43:32 +02:00
ThomasV
917f256e33 remove scheduled invoices: bad UX. better expect the user to retry later. 2022-05-21 12:24:26 +02:00
ThomasV
ac8a29efc2 kivy: minor fix 2022-05-21 12:23:01 +02:00
ThomasV
bc9cc51800 Add 'channels' parameter to create invoice and pay.
Add rebalance dialog to GUI
2022-05-21 11:35:44 +02:00
SomberNight
8ed52d4225 Qt change_password_dialog: fix deadlock in hww case if device unplugged
fixes https://github.com/spesmilo/electrum/pull/7819
2022-05-20 20:07:55 +02:00
SomberNight
a0b7782e6d Qt addr/utxo lists: in dark theme, fix item bgcolor (was pure black)
regression from e362d1aac4
2022-05-20 18:26:30 +02:00
SomberNight
57ec9612cb Qt ConfirmTxDialog: make sure dialog is deleted when closed
Same for BlockingWaitingDialog.

related: https://github.com/spesmilo/electrum/issues/3956#issuecomment-1017593613
Note that this change does not solve the "dialog sometimes does not get drawn properly" issue,
just the "dialog sometimes does not get closed properly" issue.

closes: https://github.com/spesmilo/electrum/issues/7816
2022-05-20 18:05:16 +02:00
ghost43
4e11116eab Merge pull request #7633 from JamieDriver/blockstream_jade_support
Add support for the Blockstream Jade hww
2022-05-20 15:14:03 +00:00