1
0

Merge pull request #9668 from accumulator/qml_txdialog_sane_values

qml: ConfirmTxDialog: when finalizer is invalid, don't show input/out…
This commit is contained in:
accumulator
2025-03-27 12:44:49 +01:00
committed by GitHub

View File

@@ -30,10 +30,17 @@ ElDialog {
padding: 0 padding: 0
function updateAmountText() { function updateAmountText() {
btcValue.text = Config.formatSats(finalizer.effectiveAmount, false) if (finalizer.valid) {
fiatValue.text = Daemon.fx.enabled btcValue.text = Config.formatSats(finalizer.effectiveAmount, false)
? Daemon.fx.fiatValue(finalizer.effectiveAmount, false) fiatValue.text = Daemon.fx.enabled
: '' ? Daemon.fx.fiatValue(finalizer.effectiveAmount, false)
: ''
} else {
btcValue.text = Config.formatSats(finalizer.amount, false)
fiatValue.text = Daemon.fx.enabled
? Daemon.fx.fiatValue(finalizer.amount, false)
: ''
}
} }
ColumnLayout { ColumnLayout {
@@ -213,6 +220,7 @@ ElDialog {
id: inputs_label id: inputs_label
Layout.columnSpan: 2 Layout.columnSpan: 2
Layout.topMargin: constants.paddingMedium Layout.topMargin: constants.paddingMedium
visible: finalizer.valid
labelText: qsTr('Inputs (%1)').arg(finalizer.inputs.length) labelText: qsTr('Inputs (%1)').arg(finalizer.inputs.length)
color: Material.accentColor color: Material.accentColor
@@ -225,6 +233,7 @@ ElDialog {
delegate: TxInput { delegate: TxInput {
Layout.columnSpan: 2 Layout.columnSpan: 2
Layout.fillWidth: true Layout.fillWidth: true
visible: finalizer.valid
idx: index idx: index
model: modelData model: modelData
@@ -235,6 +244,7 @@ ElDialog {
id: outputs_label id: outputs_label
Layout.columnSpan: 2 Layout.columnSpan: 2
Layout.topMargin: constants.paddingMedium Layout.topMargin: constants.paddingMedium
visible: finalizer.valid
labelText: qsTr('Outputs (%1)').arg(finalizer.outputs.length) labelText: qsTr('Outputs (%1)').arg(finalizer.outputs.length)
color: Material.accentColor color: Material.accentColor
@@ -247,6 +257,7 @@ ElDialog {
delegate: TxOutput { delegate: TxOutput {
Layout.columnSpan: 2 Layout.columnSpan: 2
Layout.fillWidth: true Layout.fillWidth: true
visible: finalizer.valid
allowShare: false allowShare: false
allowClickAddress: false allowClickAddress: false