Commit Graph

89 Commits

Author SHA1 Message Date
SomberNight cdcac8cb09 openalias: always enforce DNSSEC validation succeeds 2025-12-05 17:06:41 +00:00
f321x 088f273d9b qt: SettingsDialog: update ln fee config on slider moved
When moving the lightning fee slider in the SettingsDialog by clicking
on the range instead of pulling the slider the new fee value wouldn't
get stored in the config as the sliderRelased signal is only emitted
when the slider is pulled.
This change updates it on valueChanged.
2025-11-28 09:55:32 +01:00
Sander van Grieken 0f2a41e078 simple_config: factor out self.decimal_point and self.get_decimal_point() in favor of self.BTC_AMOUNTS_DECIMAL_POINT 2025-11-27 12:38:49 +01:00
f321x ca9c4777d8 windows: protect against screenshots and screen recordings 2025-06-06 09:29:01 +02:00
ThomasV a213dfca85 Qt: move nostr_relays to network dialog 2025-05-18 13:42:25 +02:00
f321x ee7d2ee17d validate and deduplicate relay config input in qt gui
Adds validation and deduplication of the relay urls entered in the QT
settings dialog. This is supposed to prevent malformed or duplicated
relay entries.
Also resets the relays to the default value if no (valid) url
is entered. This prevents the user from getting stuck without relays
(otherwise the user would have to research for relay urls manually if
they don't know any).
2025-05-02 09:03:27 +02:00
f321x e72de47ef0 Remove LIGHTNING_LEGACY_ADD_TRAMPOLINE config option to prevent too large onion payload
The option to add a 2nd trampoline hop to legacy trampoline payments requires too much space in the trampoline onion.
Because the trampoline onion has only limited space of 400b and the payload with 2nd t hop and no r_tags already requires 392b it is essentially unusable for payments that require routing hints to be included in the onion
(because the receiver has no direct channel to the 2nd trampoline node)
as there is no space left to include them (1r_tag == ~52b).
2025-04-14 09:35:41 +02: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
Sander van Grieken 19cd408f98 organize import, whitespace 2025-01-23 12:58:28 +01:00
ThomasV 7fdf1e0669 add nostr, and nostr_relays in config 2024-11-12 08:52:42 +01:00
SomberNight 6d593e3373 qt gui: settings: make two_trampoline cb conditional on trampoline_cb
The setting is irrelevant if trampoline is disabled.
This clears up potential confusion, as per user "js" on irc.
2024-10-04 15:44:34 +00:00
SomberNight e05d2a5dbe qt gui: clean-up QCheckBox.stateChanged handling
Some checkboxes, e.g. main_window.warn_if_testnet became buggy with pyqt6:
looks like the stateChanged signal passes an int, not a Qt.CheckState.
(and note that Qt.CheckState is an Enum, not an IntEnum).
So `x == Qt.CheckState.Checked` would always evaluate to False.

```
def on_cb(_x):
    print(f"heyheyhey. {_x=!r}, {Qt.CheckState.Checked=!r}, {cb.checkState()=!r}, {cb.isChecked()=!r}")
cb = QCheckBox("")
cb.stateChanged.connect(on_cb)
```

heyheyhey. x=2, Qt.CheckState.Checked=<CheckState.Checked: 2>, cb.checkState()=<CheckState.Checked: 2>, cb.isChecked()=True
heyheyhey. x=0, Qt.CheckState.Checked=<CheckState.Checked: 2>, cb.checkState()=<CheckState.Unchecked: 0>, cb.isChecked()=False
2024-09-18 15:48:54 +00:00
SomberNight cfe8502f96 qt desktop gui: upgrade qt5->qt6
closes https://github.com/spesmilo/electrum/issues/8007
2024-09-18 15:48:38 +00:00
SomberNight 5b74aa443e qt settings: expose LIGHTNING_PAYMENT_BUDGET_FEE_MAX_MILLIONTHS
Expose as a slider; perhaps it is less footgunny this way?
2024-05-08 15:54:20 +00: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 b2053c68f1 make use_to_trampolines a user visible option, disable it by default 2023-08-27 11:43:17 +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
SomberNight 03ab33f4b2 SimpleConfig: change API of set_key(): "save" is now kwarg-only 2023-05-25 17:37:16 +00:00
SomberNight 3bdda3a861 config: force 'history_rates' config var to bool
fixes https://github.com/spesmilo/electrum/issues/8367

probably regression from 503776c0de
(note that before that commit, we were casting to bool)
2023-05-03 12:18:34 +00:00
SomberNight 55140a9e27 gui/messages.py: allow localization of these strings 2023-04-25 17:54:07 +00:00
SomberNight 312f2641e7 don't use bare except
use "except Exception", or if really needed explicitly "except BaseException"
2023-04-24 12:58:01 +00:00
ThomasV 7207f13e97 Qt: set history_rates both through settings_dialog and history_list
follow-up 503776c0de
2023-03-16 16:48:12 +01:00
SomberNight 1740765125 qt settings_dialog: fix trampoline_cb 2023-03-13 18:51:34 +00:00
ThomasV 439f1e6331 settings_dialog: add confirmation dialog before disabling trampoline 2023-03-13 11:08:04 +01:00
ThomasV e150a9ccad restructure settings_dialog, create 'Units' tab 2023-03-13 10:02:47 +01:00
ThomasV 519926ade3 move 'allow_instant_swaps' option from preferences dialog to swap_dialog toolbar 2023-03-13 09:53:08 +01:00
ThomasV 4909cebdae move recoverable channel option from preferences to new_channel_dialog toolbar 2023-03-13 09:36:02 +01:00
ThomasV 503776c0de move fiat columns show/hide settings from settings_dialog to tab toolbars 2023-03-12 13:30:11 +01:00
ThomasV 37a0e125c6 move config settings that are related to invoice creation to receive tab. 2023-03-12 10:42:26 +01:00
ThomasV 2f6d60c715 Move transaction related settings into transaction editor.
That way, users can see the effects settings directly on their transaction.
This changes the API of make_tx:
 - get_coins is called inside make_tx, so that inputs can be changed dynamically
 - make_tx takes an optional parameter: unconfirmed_only, passed to get_coins
 - ConfirmTxDialog detects if we can pay by disabling confirmed_only or lowering fee
2023-03-05 10:17:03 +01:00
ThomasV bc3946d2f4 Qt: new onchain tx creation flow:
- transaction_dialog is read-only
 - ConfirmTxDialog and RBF dialogs inherit from TxEditor
 - TxEditors are configurable
2023-02-07 16:42:20 +01:00
myxmaster e6cdcf7413 update status bar when setting "zeros after decimal point" is changed 2023-01-10 13:51:21 +01:00
ThomasV e1dc7d1e6f Set the RBF flat to all transactions, and remove the 'use_rbf'
preference from the GUI, because the mempoolfullrbf option in
Bitcoin 0.24 makes RBF signaling pretty meaningless. Fixes #8088.

Note: RBF remains disabled for channel funding transactions.
In that case, the flag is actually only used as a semaphore
between different instances of the same wallet.
2022-12-10 18:58:15 +01:00
SomberNight be322f7ea7 qt dialogs: disconnect signals and unregister callbacks in closeEvent 2022-06-22 02:13:19 +02:00
SomberNight 5b000a871f EventListener follow-ups: adapt left-out classes and minor clean-ups 2022-06-22 02:09:26 +02:00
SomberNight 2e99ac9a94 qt preferences: fix "allow_instant_swaps" checkbox 2022-05-07 16:20:16 +02:00
ThomasV fdee31af05 Qt settings_dialog: use signals
- changes must apply to all windows
 - do not keep reference to the window object
2022-04-29 17:04:16 +02:00
ThomasV 334da245dc (minor) fix checkbox in qt settings 2022-04-29 13:03:33 +02:00
ThomasV ba018c707f Qt: add bolt11_fallback and bip21_lightning options to preferences 2022-04-20 12:48:22 +02:00
ThomasV 5bd2524bfb follow-up #7748 2022-04-09 10:51:09 +02:00
ThomasV 877a9f553b Merge pull request #7748 from spesmilo/confirm_reverse_swaps
Confirm reverse swaps
2022-04-09 10:41:02 +02:00
ThomasV 083205714c Qt: reorganize settings dialog 2022-04-01 20:20:04 +02:00
ThomasV e362d1aac4 Qt: make display of lists more stable.
Use refresh_row() for address, utxo and contact lists.
Replace unneeded calls to update_tabs() with refresh_tabs()

Fix right-click menu after selecting multiple addresses.
2022-04-01 14:11:31 +02:00
ThomasV f01197b6b5 Reverse swaps: Wait until funding tx is confirmed
- override with allow_instant_swaps option (Qt)
2022-04-01 14:05:01 +02:00
SomberNight 7a47eb9906 qt: again disable changing light/dark theme at runtime
partially reverts 11a04c0d72

related https://github.com/spesmilo/electrum/issues/7209
2022-02-18 22:17:44 +01:00
SomberNight 11a04c0d72 qt: allow changing light/dark theme at runtime
Looks like the stylesheet can be changed at any time...
so we don't need to ask the user to restart the program.

closes https://github.com/spesmilo/electrum/issues/7209
2022-02-18 18:08:38 +01:00
SomberNight 0df05dd914 qt preferences: always show cb for LN/"Create recoverable channels"
This makes it explicit that the option cannot be enabled if so (instead of hiding the checkbox).
2021-11-17 17:54:52 +01:00
SomberNight 419d71b4ef (trivial) qt settings: fix a type hint
(no change in behaviour)
2021-07-28 15:29:20 +02:00