qml: de-dupe broadcastFailed handler, styling InvoiceDialog amount
This commit is contained in:
@@ -254,6 +254,7 @@ ElDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
visible: !invoice.amount.isMax
|
visible: !invoice.amount.isMax
|
||||||
font.pixelSize: constants.fontSizeXLarge
|
font.pixelSize: constants.fontSizeXLarge
|
||||||
font.family: FixedFont
|
font.family: FixedFont
|
||||||
@@ -271,6 +272,7 @@ ElDialog {
|
|||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: fiatValue
|
id: fiatValue
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
visible: Daemon.fx.enabled && !invoice.amount.isMax
|
visible: Daemon.fx.enabled && !invoice.amount.isMax
|
||||||
text: Daemon.fx.fiatValue(invoice.amount, false)
|
text: Daemon.fx.fiatValue(invoice.amount, false)
|
||||||
font.pixelSize: constants.fontSizeMedium
|
font.pixelSize: constants.fontSizeMedium
|
||||||
|
|||||||
@@ -240,6 +240,15 @@ Item {
|
|||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: Daemon.currentWallet
|
target: Daemon.currentWallet
|
||||||
|
function onOtpRequested() {
|
||||||
|
console.log('OTP requested')
|
||||||
|
var dialog = otpDialog.createObject(mainView)
|
||||||
|
dialog.accepted.connect(function() {
|
||||||
|
console.log('accepted ' + dialog.otpauth)
|
||||||
|
Daemon.currentWallet.finish_otp(dialog.otpauth)
|
||||||
|
})
|
||||||
|
dialog.open()
|
||||||
|
}
|
||||||
function onBroadcastFailed(txid, code, message) {
|
function onBroadcastFailed(txid, code, message) {
|
||||||
var dialog = app.messageDialog.createObject(app, {
|
var dialog = app.messageDialog.createObject(app, {
|
||||||
text: message
|
text: message
|
||||||
@@ -289,22 +298,6 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: Daemon.currentWallet
|
|
||||||
function onOtpRequested() {
|
|
||||||
console.log('OTP requested')
|
|
||||||
var dialog = otpDialog.createObject(mainView)
|
|
||||||
dialog.accepted.connect(function() {
|
|
||||||
console.log('accepted ' + dialog.otpauth)
|
|
||||||
Daemon.currentWallet.finish_otp(dialog.otpauth)
|
|
||||||
})
|
|
||||||
dialog.open()
|
|
||||||
}
|
|
||||||
function onBroadcastFailed() {
|
|
||||||
notificationPopup.show(qsTr('Broadcast transaction failed'))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: sendDialog
|
id: sendDialog
|
||||||
SendDialog {
|
SendDialog {
|
||||||
|
|||||||
Reference in New Issue
Block a user