diff --git a/electrum/gui/qml/components/Preferences.qml b/electrum/gui/qml/components/Preferences.qml index 6c561a15c..b5d8c012d 100644 --- a/electrum/gui/qml/components/Preferences.qml +++ b/electrum/gui/qml/components/Preferences.qml @@ -148,6 +148,16 @@ Pane { } } + Switch { + id: useRbf + text: qsTr('Use Replace-By-Fee') + Layout.columnSpan: 2 + onCheckedChanged: { + if (activeFocus) + Config.useRbf = checked + } + } + Label { text: qsTr('Default request expiry') Layout.fillWidth: false @@ -223,6 +233,16 @@ Pane { } } + Switch { + id: useRecoverableChannels + text: qsTr('Create recoverable channels') + Layout.columnSpan: 2 + onCheckedChanged: { + if (activeFocus) + Config.useRecoverableChannels = checked + } + } + Switch { id: useFallbackAddress text: qsTr('Use onchain fallback address for Lightning invoices') @@ -233,16 +253,6 @@ Pane { } } - Switch { - id: useRbf - text: qsTr('Use Replace-By-Fee') - Layout.columnSpan: 2 - onCheckedChanged: { - if (activeFocus) - Config.useRbf = checked - } - } - } } diff --git a/electrum/gui/qml/qeconfig.py b/electrum/gui/qml/qeconfig.py index cc5663df2..f6d9a2c50 100644 --- a/electrum/gui/qml/qeconfig.py +++ b/electrum/gui/qml/qeconfig.py @@ -140,6 +140,16 @@ class QEConfig(AuthMixin, QObject): self.config.set_key('use_rbf', useRbf) self.useRbfChanged.emit() + useRecoverableChannelsChanged = pyqtSignal() + @pyqtProperty(bool, notify=useRecoverableChannelsChanged) + def useRecoverableChannels(self): + return self.config.get('use_recoverable_channels', True) + + @useRecoverableChannels.setter + def useRecoverableChannels(self, useRecoverableChannels): + self.config.set_key('use_recoverable_channels', useRecoverableChannels) + self.useRecoverableChannelsChanged.emit() + @pyqtSlot('qint64', result=str) @pyqtSlot('qint64', bool, result=str) @pyqtSlot(QEAmount, result=str)