1
0
Commit Graph

39 Commits

Author SHA1 Message Date
f321x
23c0887a5c qml: pass updated fee policy to make_tx function when opening channel 2025-04-07 14:08:15 +02:00
f321x
8b7e967555 call QEChannelOpener.validate() on updateMaxAmount 2025-04-07 10:16:48 +02:00
SomberNight
75d800a4ea gui: move reused text to messages.py 2025-03-11 15:08:45 +00:00
Sander van Grieken
083b32be3b qt,qml: more regression fixes 2025-03-10 19:42:37 +01:00
Sander van Grieken
37f0069f2a qml: calculate max amount when max toggle is enabled 2025-01-23 16:00:01 +01:00
ThomasV
c58c4d7451 Make lntransport not require lnutil.
This will be useful if we decide to ship lntransport as a separate
package. It is also a conceptual cleanup.

Notes:
 - lntransport still requires crypto.py
 - parsing node id from a bolt11 invoice is not supported.
2024-10-22 09:26:36 +02:00
Sander van Grieken
482ec89b5d minor, code style, imports 2024-02-05 21:25:13 +01:00
Sander van Grieken
6270eae5c9 qml: port PyQt5 to PyQt6 2023-11-07 10:16:18 +01:00
Sander van Grieken
190c19d48c whitespace, imports, code style 2023-09-22 16:38:37 +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
ThomasV
649ce979ab send tx change to lightning 2023-09-09 14:14:43 +02:00
ThomasV
40f2087ac3 Add option for support_large_channels.
max_funding_sats is a config variable and defaults to the old value.
2023-08-09 16:36:12 +02:00
SomberNight
24980feab7 config: introduce ConfigVars
A new config API is introduced, and ~all of the codebase is adapted to it.
The old API is kept but mainly only for dynamic usage where its extra flexibility is needed.

Using examples, the old config API looked this:
```
>>> config.get("request_expiry", 86400)
604800
>>> config.set_key("request_expiry", 86400)
>>>
```

The new config API instead:
```
>>> config.WALLET_PAYREQ_EXPIRY_SECONDS
604800
>>> config.WALLET_PAYREQ_EXPIRY_SECONDS = 86400
>>>
```

The old API operated on arbitrary string keys, the new one uses
a static ~enum-like list of variables.

With the new API:
- there is a single centralised list of config variables, as opposed to
  these being scattered all over
- no more duplication of default values (in the getters)
- there is now some (minimal for now) type-validation/conversion for
  the config values

closes https://github.com/spesmilo/electrum/pull/5640
closes https://github.com/spesmilo/electrum/pull/5649

Note: there is yet a third API added here, for certain niche/abstract use-cases,
where we need a reference to the config variable itself.
It should only be used when needed:
```
>>> var = config.cv.WALLET_PAYREQ_EXPIRY_SECONDS
>>> var
<ConfigVarWithConfig key='request_expiry'>
>>> var.get()
604800
>>> var.set(3600)
>>> var.get_default_value()
86400
>>> var.is_set()
True
>>> var.is_modifiable()
True
```
2023-05-25 17:39:48 +00:00
Sander van Grieken
a8a0b36fdb qml: code style, imports 2023-05-09 16:15:09 +02:00
SomberNight
55140a9e27 gui/messages.py: allow localization of these strings 2023-04-25 17:54:07 +00:00
Sander van Grieken
e26d49f11e qml: consistency camelcase public slots qetxdetails, qelnpaymentdetails, qechannelopener, qeaddressdetails 2023-04-25 13:46:30 +02:00
ThomasV
b42bb84b5c fix typo 2023-04-17 19:04:09 +02:00
ThomasV
a03f4769ca auth_protect: pass authMessage in the auth_protect decorator,
instead of relying on side-effects

This is probably safer, and also more self-contained.
2023-04-17 18:17:29 +02:00
ThomasV
1421df57ad add auth message for open_channel 2023-04-17 17:14:23 +02:00
SomberNight
c0f8986188 qml: QEChannelOpener: accept any connection strings other GUIs accept
trying to paste a bare nodeid errored silently, logging:
174.76 | D | gui.qml.qechannelopener | AttributeError("'NoneType' object has no attribute '__contains__'")
2023-04-06 14:30:36 +00:00
SomberNight
36d800063f lnutil: add docstring and more tests for extract_nodeid 2023-04-06 14:30:32 +00:00
ThomasV
d4c386a62c qml: use daemon threads everywhere the network is involved
The app hangs indefinitely if we try to quit it while one of
these threads is active, because once asyncio has shut down,
futures never return. This was already fixed for lightning
payments in c5dc133, but there are many other cases.
2023-04-05 12:31:20 +02:00
Sander van Grieken
6b8f9f8fe2 qml: allow ln node connect string without port, default to 9735 2023-02-08 17:31:08 +01:00
Sander van Grieken
0bc8460005 qml: don't initialize instance variables on class scope for non-singletons
(this somehow escaped attention before, as most objects usually don't have multiple instances,
unless multiple wallets are open at the same time.)
Also, move all signal declarations, class constants and variables to the top of class definitions.
2023-01-12 13:09:21 +01:00
Sander van Grieken
ffcd533a8d qml: refactor OpenChannel to dialog, fix lifecycle/race conditions swap & openchannel 2022-11-30 15:10:35 +01:00
Sander van Grieken
090706bfd6 qml: fix crashes on tx finalizing 2022-10-04 21:51:55 +02:00
Sander van Grieken
629b0c56f3 qml: fix missing import 2022-08-26 15:15:40 +02:00
Sander van Grieken
34c901b1a6 qml: add Save Backup dialog when no onchain backup, some initial work on incomplete funding TX 2022-08-26 15:06:10 +02:00
Sander van Grieken
b9f381a133 qml: fix channel double add to list on open, better display errors 2022-08-26 13:21:49 +02:00
Sander van Grieken
5008cef491 qml: optimize imports 2022-07-28 16:53:05 +02:00
Sander van Grieken
509e0fcc07 qml: initial channel open progress dialog 2022-07-26 18:03:34 +02:00
Sander van Grieken
83cb7aea9a qml: fix 2022-07-22 16:37:42 +02:00
Sander van Grieken
b858336d5e qml: some fixes for gossip mode channel open. add kangaroo icon to channeldelegate 2022-07-22 15:53:10 +02:00
Sander van Grieken
cbd4d2a2ae make rbf selection allowed configurable 2022-07-07 18:30:20 +02:00
Sander van Grieken
7a26ab259c update channel listmodel when channel opened 2022-07-07 18:29:02 +02:00
Sander van Grieken
2907698c17 support for MAX amounts 2022-07-07 18:29:02 +02:00
Sander van Grieken
dc69391204 initial working channel open flow 2022-07-07 18:29:01 +02:00
Sander van Grieken
81b1f774e2 expose more trampoline boilerplate
allow delegation of make_tx and accept/send
2022-07-07 18:29:01 +02:00
Sander van Grieken
c55aa7bb48 wip lightning 2022-07-07 18:29:01 +02:00