Commit Graph

3507 Commits

Author SHA1 Message Date
ThomasV
62f5e7f6bd Merge pull request #9606 from f321x/jit-improve-qml
Handle just in time channels in qml request creation
2025-03-14 08:35:37 +01:00
ThomasV
3adfe9a8de Merge pull request #9598 from f321x/jit-gui-improvements
Handle zeroconf lightning requests in QT gui
2025-03-14 08:34:00 +01:00
SomberNight
80d0d5fddd qt confirm_tx_dialog: show frozen balance if "not enough funds" 2025-03-13 23:32:19 +00:00
f321x
601ff7f731 use FeePolicy in qeswaphelper 2025-03-13 17:31:42 +01:00
f321x
af8d1fb401 handle jit invoices in qml
make min funding amount symbol, change Signal name, change Exception type

change minChannelFunding to QEAmount and make message text variable

qml: improve translatibility of strings

init minchannelfunding value in init method

rebase on master
2025-03-13 12:02:46 +01:00
f321x
5134d07b14 add zeroconf handling to qt gui 2025-03-13 11:49:50 +01:00
ThomasV
bdb7a82220 batch payment manager:
The class TxBatcher handles the creation, broadcast and replacement
of replaceable transactions. Callers (LNWatcher, SwapManager) use
methods add_payment_output and add_sweep_info. Transactions
created by TxBatcher may combine sweeps and outgoing payments.

Transactions created by TxBatcher will have their fee bumped
automatically (this was only the case for sweeps before).

TxBatcher manages several TxBatches. TxBatches are created
dynamically when needed.

The GUI does not touch txbatcher transactions:
  - wallet.get_candidates_for_batching excludes txbatcher
    transactions
  - RBF dialogs do not work with txbatcher transactions

wallet:
  - instead of reading config variables, make_unsigned_transaction
    takes new parameters: base_tx, send_change_to_lighting

tests:
  - unit tests in test_txbatcher.py (replaces test_sswaps.py)
  - force all regtests to use MPP, so that we sweep transactions
    with several HTLCs. This forces the payment manager to aggregate
    first-stage HTLC tx inputs. second-stage are not batched for now.
2025-03-13 10:17:10 +01:00
ThomasV
e09676b26f swaps_dialog: fee_slider_callback should be called at the end of constructor 2025-03-13 08:47:30 +01:00
SomberNight
3f327eea07 wallet: fix wallet.make_unsigned_transaction method signature
- "fee_policy" arg is actually mandatory
- and fix test/stdio guis following fee_policy/config split

follow-up 840243e029
2025-03-11 16:15:17 +00:00
SomberNight
7343d69ed7 qt/fee_slider: add type hints, small API change, qt parenting 2025-03-11 15:45:26 +00:00
SomberNight
163f59f83f qt/main_window: fix regression in confirm_tx_dialog
follow-up 605b511b43
2025-03-11 15:22:14 +00: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
f917234acc qml: more regression fixes w.r.t 840243e029 2025-03-10 17:38:21 +01:00
Sander van Grieken
7030f3de18 qml: followup d005da1ea2 2025-03-09 14:55:00 +01:00
ThomasV
d5ee678b7f if a network object is there but fee estimates are not available,
raise NoDynamicFeeEstimates in FeePolicy rather than in wallet.

Also, show an error message in Qt
2025-03-06 13:13:01 +01:00
Sander van Grieken
7d8a5cc259 qml: improve QEAmount comments, convert to docstring. 2025-03-06 10:56:28 +01:00
ThomasV
074ede8f12 make_unsigned_transaction: pass merge_duplicate_outputs as
a parameter, because it must not be used in some contexts
(e.g. tx batcher).

This makes config.MERGE_DUPLICATE_OUTPUTS a GUI option
2025-03-06 09:22:12 +01:00
SomberNight
2aa427b4bf Merge branch 'pr/9507': qt: refactor NetworkChoiceLayout to ProxyWidget+ServerWidget
ref https://github.com/spesmilo/electrum/pull/9507
2025-03-05 15:01:05 +00:00
ThomasV
ab14c3e138 tx batching in GUI:
- discard config.WALLET_BATCH_RBF
 - allow the user to choose base_tx from a list of batching
   candidates in ConfirmTxDialog
2025-03-05 14:07:02 +01:00
ThomasV
d97ce7ed73 minor fix, follow-up #9597 2025-03-05 11:31:35 +01:00
Sander van Grieken
f1e9abf04e qt,qml: review rework, refactor spinner, add tor probe active indicator 2025-03-05 10:52:25 +01:00
ThomasV
840243e029 separate fee policy from config
- Wallet.make_unsigned_transaction takes a FeePolicy parameter
 - fee sliders act on a FeePolicy instead of config
 - different fee policies may be used for different purposes
 - do not detect dust outputs in lnsweep, delegate that to lnwatcher
2025-03-05 10:29:26 +01:00
Sander van Grieken
fea598cfbe network: create ProxySettings class replacing dict and encapsulating proxy related funcs,
allow enable/disable proxy without nuking proxy mode, host and port (explicit enable_proxy config setting),
move tor probe from frontend to backend code, add probe buttons for Qt and QML
2025-03-04 14:23:33 +01:00
Sander van Grieken
f2b1d09a88 qt: tor icon click opens network dialog on proxy tab 2025-03-04 14:23:33 +01:00
Sander van Grieken
182c3d3081 qt: refactor NetworkChoiceLayout to ProxyWidget+ServerWidget 2025-03-04 14:23:33 +01:00
Oren
0618fff03c Cache font-ids that were already loaded
`get_font_id` also saves the trouble of
specifying the entire path of the fonts.
2025-03-04 12:11:30 +02:00
accumulator
016da31a0a Merge pull request #9595 from accumulator/move_fonts_all_guis
qt,qml: move fonts to /electrum/gui for use in all guis.
2025-03-03 14:36:50 +01:00
ThomasV
0e40be5fb5 swaps: replace request_swap_for_tx with request_swap_for_amount,
as this uses less side effects

(change backported from batch_payment_manager)
2025-03-03 14:02:29 +01:00
Sander van Grieken
fc2d43acfd qt,qml: move fonts to /electrum/gui for use in all guis. 2025-03-03 13:47:03 +01:00
f321x
dd1f786951 make question dialog child of SettingsDialog 2025-02-28 16:41:53 +01:00
ThomasV
5ce80332ec Qt: do not expose watchtower in settings
running a watchtower requires to be able to run a daemon with the
watchtower plugin enabled. If users succeed at doing that, we
can expect them to be able to configure theclient using the
command line.

(that would not work with QML, though. maybe QML could use an
advanced config editor)
2025-02-26 12:32:38 +01:00
ThomasV
8a96c88615 remove config vars WALLET_BIP21_LIGHTNING and WALLET_BOLT11_FALLBACK (see #9580) 2025-02-26 11:41:59 +01:00
Sander van Grieken
376d881154 qml: always initialize BtcField.textAsSats 2025-02-26 11:02:12 +01:00
ThomasV
a371102a4c update text gui for lightning invoices 2025-02-25 11:28:07 +01:00
Sander van Grieken
d005da1ea2 qml: remove display states in ReceiveDialog, add balance check for enabling Lightning receive option. 2025-02-25 11:28:07 +01:00
ThomasV
3d2531cb93 reintroduce separate request types for lightning and onchain
cmdline: add_request has a --lightning option
2025-02-25 11:27:32 +01:00
ThomasV
30901212d0 Merge pull request #9467 from accumulator/qml_input_output_color
qml: apply TxInput/TxOutput coloring for swap and billing addresses.
2025-02-24 12:54:33 +01:00
f321x
f475a71871 show flat fee in qml swap provider selection 2025-02-21 08:59:18 +01:00
SomberNight
a3fc43cc2d qml: remove dependency "Pillow" (and its transitive deps)
closes https://github.com/spesmilo/electrum/issues/9572
2025-02-20 18:53:08 +00:00
f321x
6f97b7b5f9 simplify submarine swap onchain fee model to single base fee 2025-02-20 16:51:48 +01:00
ThomasV
f9c427124d qml: fix follow-up 392c219913 2025-02-20 09:38:47 +01:00
ThomasV
392c219913 simplify history-related commands:
- reduce number of methods
 - use nametuples instead of dicts
 - only two types: OnchainHistoryItem and LightningHistoryItem
 - channel open/closes are groups
 - move capital gains into separate RPC
2025-02-19 11:40:21 +01:00
SomberNight
ae8bfdcb51 qt: main_window: (trivial) fix typo on statusbar
a whitespace was missing
2025-02-18 15:36:27 +00:00
SomberNight
2d8c26f211 qt swaps: fix _spend_max_reverse_swap: round down msats
Clicking "max" btn for a reverse swap was setting the text field to a too high value.

```
>>> wallet.lnworker.num_sats_can_send()
Decimal('1242647.947')
>>> util.format_satoshis_plain(Decimal('1242647.947'))
'0.01242648'
```
2025-02-14 14:33:51 +00:00
SomberNight
6749468866 swaps: add base class for transports. move "get_recent_offers" logic
the "get_recent_offers" logic is now shared between the GUIs
2025-02-14 14:10:24 +00:00
ThomasV
5600e79edd fix swaps-over-nostr qml:
- post-rebase fixes
 - await sm.is_initalized.wait() instead of waiting 1 second
 - fix max_amount computation if channel recv capacity is higher
   than the max: the value returned by get_send_amount was zero
 - fix indentation
2025-02-14 10:57:01 +01:00
Sander van Grieken
993a575b7f submarine_swaps: implement swaps-over-nostr for qml 2025-02-14 09:54:09 +01:00
ThomasV
b097150806 Merge pull request #9551 from f321x/swap_nostr_event_type
Change nostr swap event type, add PoW, rebroadcast events
2025-02-12 10:31:54 +01:00
f321x
947094c1b0 add pow, more default relays, new event type 2025-02-11 18:16:15 +01:00