qml: de-dupe broadcastFailed handler, styling InvoiceDialog amount
This commit is contained in:
@@ -254,6 +254,7 @@ ElDialog {
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: !invoice.amount.isMax
|
||||
font.pixelSize: constants.fontSizeXLarge
|
||||
font.family: FixedFont
|
||||
@@ -271,6 +272,7 @@ ElDialog {
|
||||
|
||||
Label {
|
||||
id: fiatValue
|
||||
Layout.alignment: Qt.AlignRight
|
||||
visible: Daemon.fx.enabled && !invoice.amount.isMax
|
||||
text: Daemon.fx.fiatValue(invoice.amount, false)
|
||||
font.pixelSize: constants.fontSizeMedium
|
||||
|
||||
@@ -240,6 +240,15 @@ 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(txid, code, message) {
|
||||
var dialog = app.messageDialog.createObject(app, {
|
||||
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 {
|
||||
id: sendDialog
|
||||
SendDialog {
|
||||
|
||||
Reference in New Issue
Block a user