move 'allow_instant_swaps' option from preferences dialog to swap_dialog toolbar

This commit is contained in:
ThomasV
2023-03-13 09:53:08 +01:00
parent 4909cebdae
commit 519926ade3
3 changed files with 15 additions and 12 deletions
-11
View File
@@ -122,16 +122,6 @@ class SettingsDialog(QDialog, QtEventListener):
util.trigger_callback('channels_updated', self.wallet)
trampoline_cb.stateChanged.connect(on_trampoline_checked)
help_instant_swaps = ' '.join([
_("If this option is checked, your client will complete reverse swaps before the funding transaction is confirmed."),
_("Note you are at risk of losing the funds in the swap, if the funding transaction never confirms.")
])
instant_swaps_cb = QCheckBox(_("Allow instant swaps"))
instant_swaps_cb.setToolTip(messages.to_rtf(help_instant_swaps))
instant_swaps_cb.setChecked(bool(self.config.get('allow_instant_swaps', False)))
def on_instant_swaps_checked(allow_instant_swaps):
self.config.set_key('allow_instant_swaps', bool(allow_instant_swaps))
instant_swaps_cb.stateChanged.connect(on_instant_swaps_checked)
help_remote_wt = ' '.join([
_("A watchtower is a daemon that watches your channels and prevents the other party from stealing funds by broadcasting an old state."),
@@ -368,7 +358,6 @@ class SettingsDialog(QDialog, QtEventListener):
gui_widgets.append((thousandsep_cb, None))
lightning_widgets = []
lightning_widgets.append((trampoline_cb, None))
lightning_widgets.append((instant_swaps_cb, None))
lightning_widgets.append((remote_wt_cb, self.watchtower_url_e))
fiat_widgets = []
fiat_widgets.append((QLabel(_('Fiat currency')), ccy_combo))