Skip to content

Commit 869585b

Browse files
committed
receivePayment: clear when switching wallets
1 parent fb69f11 commit 869585b

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

qml/pages/wallet/RequestPayment.qml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,14 @@ Page {
208208
}
209209
}
210210

211+
function clear() {
212+
clearRequest.visible = false
213+
title.text = qsTr("Request a payment")
214+
address.text = ""
215+
qrImage.code = ""
216+
continueButton.text = qsTr("Create bitcoin address")
217+
}
218+
211219
ContinueButton {
212220
id: clearRequest
213221
Layout.fillWidth: true
@@ -221,11 +229,14 @@ Page {
221229
backgroundPressedColor: "transparent"
222230
text: qsTr("Clear")
223231
onClicked: {
224-
clearRequest.visible = false
225-
title.text = qsTr("Request a payment")
226-
address.text = ""
227-
qrImage.code = ""
228-
continueButton.text = qsTr("Create bitcoin address")
232+
columnLayout.clear()
233+
}
234+
}
235+
236+
Connections {
237+
target: walletController
238+
function onSelectedWalletChanged() {
239+
columnLayout.clear()
229240
}
230241
}
231242
}

0 commit comments

Comments
 (0)