Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions qml/pages/wallet/RequestPayment.qml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,14 @@ Page {
}
}

function clear() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move to the root? It is a reasonable function at the component level.

clearRequest.visible = false
title.text = qsTr("Request a payment")
address.text = ""
qrImage.code = ""
continueButton.text = qsTr("Create bitcoin address")
}

ContinueButton {
id: clearRequest
Layout.fillWidth: true
Expand All @@ -221,11 +229,14 @@ Page {
backgroundPressedColor: "transparent"
text: qsTr("Clear")
onClicked: {
clearRequest.visible = false
title.text = qsTr("Request a payment")
address.text = ""
qrImage.code = ""
continueButton.text = qsTr("Create bitcoin address")
columnLayout.clear()
}
}

Connections {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to not rely on walletController, move this to DesktopWallets where walletController is already referenced, add an id to RequestPayment and call clear().

target: walletController
function onSelectedWalletChanged() {
columnLayout.clear()
}
}
}
Expand Down
Loading