@ -26,185 +26,198 @@ ElDialog {
anchors.fill: parent
spacing: 0
GridLayout {
Layout.preferredWidth: parent . width
Layout.leftMargin: constants . paddingLarge
Layout.rightMargin: constants . paddingLarge
columns: 2
Label {
Layout.columnSpan: 2
Layout.fillWidth: true
text: qsTr ( 'A CPFP is a transaction that sends an unconfirmed output back to yourself, with a high fee. The goal is to have miners confirm the parent transaction in order to get the fee attached to the child transaction.' )
wrapMode: Text . Wrap
}
Flickable {
Layout.fillWidth: true
Layout.fillHeight: true
Label {
Layout.columnSpan: 2
Layout.fillWidth: true
Layout.bottomMargin: constants . paddingLarge
text: qsTr ( 'The proposed fee is computed using your fee/kB settings, applied to the total size of both child and parent transactions. After you broadcast a CPFP transaction, it is normal to see a new unconfirmed transaction in your history.' )
wrapMode: Text . Wrap
}
leftMargin: constants . paddingLarge
rightMargin: constants . paddingLarge
Label {
Layout.preferredWidth: 1
Layout.fillWidth: true
text: qsTr ( 'Total size' )
color: Material . accentColor
}
contentHeight: rootLayout . height
clip: true
interactive: height < contentHeight
Label {
Layout.preferredWidth: 1
Layout.fillWidth: true
text: qsTr ( '%1 bytes' ) . arg ( cpfpfeebumper . totalSize )
}
GridLayout {
id: rootLayout
width: parent . width
Label {
text: qsTr ( 'Input amount' )
color: Material . accentColor
}
columns: 2
FormattedAmount {
amount: cpfpfeebumper . inputAmount
}
Label {
Layout.columnSpan: 2
Layout.fillWidth: true
text: qsTr ( 'A CPFP is a transaction that sends an unconfirmed output back to yourself, with a high fee. The goal is to have miners confirm the parent transaction in order to get the fee attached to the child transaction.' )
wrapMode: Text . Wrap
}
Label {
text: qsTr ( 'Output amount' )
color: Material . accentColor
}
Label {
Layout.columnSpan: 2
Layout.fillWidth: true
Layout.bottomMargin: constants . paddingLarge
text: qsTr ( 'The proposed fee is computed using your fee/kB settings, applied to the total size of both child and parent transactions. After you broadcast a CPFP transaction, it is normal to see a new unconfirmed transaction in your history.' )
wrapMode: Text . Wrap
}
FormattedAmount {
amount: cpfpfeebumper . outputAmount
valid: cpfpfeebumper . valid
}
Label {
Layout.preferredWidth: 1
Layout.fillWidth: true
text: qsTr ( 'Total size' )
color: Material . accentColor
}
Slider {
id: feeslider
leftPadding: constants . paddingMedium
snapMode: Slider . SnapOnRelease
stepSize: 1
from: 0
to: cpfpfeebumper . sliderSteps
onValueChanged: {
if ( activeFocus )
cpfpfeebumper . sliderPos = value
}
Component.onCompleted: {
value = cpfpfeebumper . sliderPos
}
Connections {
target: cpfpfeebumper
function onSliderPosChanged ( ) {
feeslider . value = cpfpfeebumper . sliderPos
}
Label {
Layout.preferredWidth: 1
Layout.fillWidth: true
text: qsTr ( '%1 bytes' ) . arg ( cpfpfeebumper . totalSize )
}
}
FeeMethodComboBox {
id: feemethod
feeslider: cpfpfeebumpe r
}
Label {
text: qsTr ( 'Input amount' )
color: Material . accentColor
}
Label {
visible: feemethod . currentValue
text: qsTr ( 'Target' )
color: Material . accentColor
}
FormattedAmount {
amount: cpfpfeebumper . inputAmount
}
Label {
visible: feemethod . currentValue
text: cpfpfeebumper . target
}
Label {
text: qsTr ( 'Output amount' )
color: Material . accentColor
}
Label {
text: qsTr ( 'Fee for child' )
color: Material . accentColor
}
FormattedAmount {
amount: cpfpfeebumper . outputAmount
valid: cpfpfeebumper . valid
}
FormattedAmount {
amount: cpfpfeebumper . feeForChild
valid: cpfpfeebumper . valid
}
RowLayout {
Layout.columnSpan: 2
Slider {
id: feeslider
leftPadding: constants . paddingMedium
snapMode: Slider . SnapOnRelease
stepSize: 1
from: 0
to: cpfpfeebumper . sliderSteps
onValueChanged: {
if ( activeFocus )
cpfpfeebumper . sliderPos = value
}
Component.onCompleted: {
value = cpfpfeebumper . sliderPos
}
Connections {
target: cpfpfeebumper
function onSliderPosChanged ( ) {
feeslider . value = cpfpfeebumper . sliderPos
}
}
}
Label {
text: qsTr ( 'Total fee' )
color: Material . accentColor
}
FeeMethodComboBox {
id: feemethod
feeslider: cpfpfeebumper
}
}
FormattedAmount {
amount: cpfpfeebumper . totalFee
valid: cpfpfeebumper . valid
}
Label {
visible: feemethod . currentValue
text: qsTr ( 'Target' )
color: Material . accentColor
}
Label {
text: qsTr ( 'Total fee rate' )
color: Material . accentColor
}
Label {
visible: feemethod . currentValue
text: cpfpfeebumper . target
}
RowLayout {
Label {
text: cpfpfeebumper . valid ? cpfpfeebumper.totalFeeRate : ''
font.family: FixedFont
text: qsTr ( 'Fee for child' )
color: Material . accentColor
}
FormattedAmount {
amount: cpfpfeebumper . feeForChild
valid: cpfpfeebumper . valid
}
Label {
visible: cpfpfeebumper . valid
text: 'sat/vB'
text: qsTr ( 'Total fee' )
color: Material . accentColor
}
}
InfoTextArea {
Layout.columnSpan: 2
Layout.preferredWidth: parent . width * 3 / 4
Layout.alignment: Qt . AlignHCenter
Layout.topMargin: constants . paddingLarge
visible: cpfpfeebumper . warning != ''
text: cpfpfeebumper . warning
iconStyle: InfoTextArea . IconStyle . Warn
}
FormattedAmount {
amount: cpfpfeebumper . totalFee
valid: cpfpfeebumper . valid
}
Label {
visible: cpfpfeebumper . valid
text: qsTr ( 'Outputs' )
Layout.columnSpan: 2
color: Material . accentColor
}
Label {
text: qsTr ( 'Total fee rate' )
color: Material . accentColor
}
RowLayout {
Label {
text: cpfpfeebumper . valid ? cpfpfeebumper.totalFeeRate : ''
font.family: FixedFont
}
Repeater {
model: cpfpfeebumper . valid ? cpfpfeebumper.outputs : [ ]
delegate: TextHighlightPane {
Label {
visible: cpfpfeebumper . valid
text: 'sat/vB'
color: Material . accentColor
}
}
InfoTextArea {
Layout.columnSpan: 2
Layout.fillWidth: true
Layout.preferredWidth: parent . width * 3 / 4
Layout.alignment: Qt . AlignHCenter
Layout.topMargin: constants . paddingLarge
visible: cpfpfeebumper . warning != ''
text: cpfpfeebumper . warning
iconStyle: InfoTextArea . IconStyle . Warn
}
RowLayout {
width: parent . width
Label {
text: modelData . address
Layout.fillWidth: true
wrapMode: Text . Wrap
font.pixelSize: constants . fontSizeLarge
font.family: FixedFont
color: modelData . is_mine ? constants.colorMine : Material . foreground
}
Label {
text: Config . formatSats ( modelData . value_sats )
font.pixelSize: constants . fontSizeMedium
font.family: FixedFont
}
Label {
text: Config . baseUnit
font.pixelSize: constants . fontSizeMedium
color: Material . accentColor
Label {
visible: cpfpfeebumper . valid
text: qsTr ( 'Outputs' )
Layout.columnSpan: 2
color: Material . accentColor
}
Repeater {
model: cpfpfeebumper . valid ? cpfpfeebumper.outputs : [ ]
delegate: TextHighlightPane {
Layout.columnSpan: 2
Layout.fillWidth: true
RowLayout {
width: parent . width
Label {
text: modelData . address
Layout.fillWidth: true
wrapMode: Text . Wrap
font.pixelSize: constants . fontSizeLarge
font.family: FixedFont
color: modelData . is_mine ? constants.colorMine : Material . foreground
}
Label {
text: Config . formatSats ( modelData . value_sats )
font.pixelSize: constants . fontSizeMedium
font.family: FixedFont
}
Label {
text: Config . baseUnit
font.pixelSize: constants . fontSizeMedium
color: Material . accentColor
}
}
}
}
}
}
Item { Layout.fillHeight: true ; Layout.preferredWidth: 1 }
FlatButton {
id: sendButton
Layout.fillWidth: true