Browse Source

qml: expose RbF in config/preferences

patch-4
Sander van Grieken 2 years ago
parent
commit
e5951bbd2d
  1. 11
      electrum/gui/qml/components/Preferences.qml
  2. 2
      electrum/gui/qml/components/WalletMainView.qml
  3. 10
      electrum/gui/qml/qeconfig.py

11
electrum/gui/qml/components/Preferences.qml

@ -233,6 +233,16 @@ Pane {
}
}
Switch {
id: useRbf
text: qsTr('Use Replace-By-Fee')
Layout.columnSpan: 2
onCheckedChanged: {
if (activeFocus)
Config.useRbf = checked
}
}
}
}
@ -287,6 +297,7 @@ Pane {
spendUnconfirmed.checked = Config.spendUnconfirmed
lnRoutingType.currentIndex = Config.useGossip ? 0 : 1
useFallbackAddress.checked = Config.useFallbackAddress
useRbf.checked = Config.useRbf
var plugins = AppController.plugins
for (var i=0; i<plugins.length; i++) {

2
electrum/gui/qml/components/WalletMainView.qml

@ -241,7 +241,7 @@ Item {
title: qsTr('Confirm Payment')
finalizer: TxFinalizer {
wallet: Daemon.currentWallet
canRbf: true
canRbf: Config.useRbf
}
onClosed: destroy()
}

10
electrum/gui/qml/qeconfig.py

@ -130,6 +130,16 @@ class QEConfig(AuthMixin, QObject):
self.config.set_key('bolt11_fallback', use_fallback)
self.useFallbackAddressChanged.emit()
useRbfChanged = pyqtSignal()
@pyqtProperty(bool, notify=useRbfChanged)
def useRbf(self):
return self.config.get('use_rbf', True)
@useRbf.setter
def useRbf(self, useRbf):
self.config.set_key('use_rbf', useRbf)
self.useRbfChanged.emit()
@pyqtSlot('qint64', result=str)
@pyqtSlot('qint64', bool, result=str)
@pyqtSlot(QEAmount, result=str)

Loading…
Cancel
Save