qml: add tx options to ConfirmTxDialog, RbfBumpFeeDialog
This commit is contained in:
committed by
SomberNight
parent
357ac6be92
commit
39afa2c3e2
@@ -137,6 +137,66 @@ ElDialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ToggleLabel {
|
||||||
|
id: optionstoggle
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
labelText: qsTr('Options')
|
||||||
|
color: Material.accentColor
|
||||||
|
}
|
||||||
|
|
||||||
|
TextHighlightPane {
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
Layout.fillWidth: true
|
||||||
|
visible: !optionstoggle.collapsed
|
||||||
|
height: optionslayout.height
|
||||||
|
|
||||||
|
GridLayout {
|
||||||
|
id: optionslayout
|
||||||
|
width: parent.width
|
||||||
|
columns: 2
|
||||||
|
|
||||||
|
ElCheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr('Use multiple change addresses')
|
||||||
|
onCheckedChanged: {
|
||||||
|
if (activeFocus) {
|
||||||
|
Daemon.currentWallet.multipleChange = checked
|
||||||
|
finalizer.doUpdate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
checked = Daemon.currentWallet.multipleChange
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HelpButton {
|
||||||
|
heading: qsTr('Use multiple change addresses')
|
||||||
|
helptext: qsTr('To somewhat protect your privacy, Electrum tries to create change with similar precision to other outputs.')
|
||||||
|
}
|
||||||
|
|
||||||
|
ElCheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr('Enable output value rounding')
|
||||||
|
onCheckedChanged: {
|
||||||
|
if (activeFocus) {
|
||||||
|
Config.outputValueRounding = checked
|
||||||
|
finalizer.doUpdate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
checked = Config.outputValueRounding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HelpButton {
|
||||||
|
heading: qsTr('Enable output value rounding')
|
||||||
|
helptext: qsTr('In some cases, use up to 3 change addresses in order to break up large coin amounts and obfuscate the recipient address.')
|
||||||
|
+ ' ' + qsTr('This may result in higher transactions fees.')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
InfoTextArea {
|
InfoTextArea {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|||||||
@@ -120,6 +120,46 @@ ElDialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ToggleLabel {
|
||||||
|
id: optionstoggle
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
labelText: qsTr('Options')
|
||||||
|
color: Material.accentColor
|
||||||
|
}
|
||||||
|
|
||||||
|
TextHighlightPane {
|
||||||
|
Layout.columnSpan: 2
|
||||||
|
Layout.fillWidth: true
|
||||||
|
visible: !optionstoggle.collapsed
|
||||||
|
height: optionslayout.height
|
||||||
|
|
||||||
|
GridLayout {
|
||||||
|
id: optionslayout
|
||||||
|
width: parent.width
|
||||||
|
columns: 2
|
||||||
|
|
||||||
|
ElCheckBox {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr('Enable output value rounding')
|
||||||
|
onCheckedChanged: {
|
||||||
|
if (activeFocus) {
|
||||||
|
Config.outputValueRounding = checked
|
||||||
|
rbffeebumper.doUpdate()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
checked = Config.outputValueRounding
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HelpButton {
|
||||||
|
heading: qsTr('Enable output value rounding')
|
||||||
|
helptext: qsTr('In some cases, use up to 3 change addresses in order to break up large coin amounts and obfuscate the recipient address.')
|
||||||
|
+ ' ' + qsTr('This may result in higher transactions fees.')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
InfoTextArea {
|
InfoTextArea {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
Layout.preferredWidth: parent.width * 3/4
|
Layout.preferredWidth: parent.width * 3/4
|
||||||
|
|||||||
@@ -244,6 +244,17 @@ class QEConfig(AuthMixin, QObject):
|
|||||||
self.config.GUI_QML_ADDRESS_LIST_SHOW_USED = addresslistShowUsed
|
self.config.GUI_QML_ADDRESS_LIST_SHOW_USED = addresslistShowUsed
|
||||||
self.addresslistShowUsedChanged.emit()
|
self.addresslistShowUsedChanged.emit()
|
||||||
|
|
||||||
|
outputValueRoundingChanged = pyqtSignal()
|
||||||
|
@pyqtProperty(bool, notify=outputValueRoundingChanged)
|
||||||
|
def outputValueRounding(self):
|
||||||
|
return self.config.WALLET_COIN_CHOOSER_OUTPUT_ROUNDING
|
||||||
|
|
||||||
|
@outputValueRounding.setter
|
||||||
|
def outputValueRounding(self, outputValueRounding):
|
||||||
|
if outputValueRounding != self.config.WALLET_COIN_CHOOSER_OUTPUT_ROUNDING:
|
||||||
|
self.config.WALLET_COIN_CHOOSER_OUTPUT_ROUNDING = outputValueRounding
|
||||||
|
self.outputValueRoundingChanged.emit()
|
||||||
|
|
||||||
@pyqtSlot('qint64', result=str)
|
@pyqtSlot('qint64', result=str)
|
||||||
@pyqtSlot(QEAmount, result=str)
|
@pyqtSlot(QEAmount, result=str)
|
||||||
def formatSatsForEditing(self, satoshis):
|
def formatSatsForEditing(self, satoshis):
|
||||||
|
|||||||
@@ -214,6 +214,10 @@ class TxFeeSlider(FeeSlider):
|
|||||||
def valid(self):
|
def valid(self):
|
||||||
return self._valid
|
return self._valid
|
||||||
|
|
||||||
|
@pyqtSlot()
|
||||||
|
def doUpdate(self):
|
||||||
|
self.update()
|
||||||
|
|
||||||
def update_from_tx(self, tx):
|
def update_from_tx(self, tx):
|
||||||
tx_size = tx.estimated_size()
|
tx_size = tx.estimated_size()
|
||||||
fee = tx.get_fee()
|
fee = tx.get_fee()
|
||||||
|
|||||||
@@ -161,6 +161,18 @@ class QEWallet(AuthMixin, QObject, QtEventListener):
|
|||||||
self._logger.info(progress)
|
self._logger.info(progress)
|
||||||
self.synchronizingProgressChanged.emit()
|
self.synchronizingProgressChanged.emit()
|
||||||
|
|
||||||
|
multipleChangeChanged = pyqtSignal()
|
||||||
|
@pyqtProperty(bool, notify=multipleChangeChanged)
|
||||||
|
def multipleChange(self):
|
||||||
|
return self.wallet.multiple_change
|
||||||
|
|
||||||
|
@multipleChange.setter
|
||||||
|
def multipleChange(self, multiple_change):
|
||||||
|
if self.wallet.multiple_change != multiple_change:
|
||||||
|
self.wallet.multiple_change = multiple_change
|
||||||
|
self.wallet.db.put('multiple_change', self.wallet.multiple_change)
|
||||||
|
self.multipleChangeChanged.emit()
|
||||||
|
|
||||||
@qt_event_listener
|
@qt_event_listener
|
||||||
def on_event_request_status(self, wallet, key, status):
|
def on_event_request_status(self, wallet, key, status):
|
||||||
if wallet == self.wallet:
|
if wallet == self.wallet:
|
||||||
|
|||||||
Reference in New Issue
Block a user