diff options
| author | Riccardo Spagni <ric@spagni.net> | 2016-10-24 10:31:54 +0200 |
|---|---|---|
| committer | Riccardo Spagni <ric@spagni.net> | 2016-10-24 10:31:54 +0200 |
| commit | 08c7ff2ca4927d8d9edd7028c02376ff0983a5ad (patch) | |
| tree | b4080347ba08841070791cce3eebf3e5a6e8a3d7 | |
| parent | ffeeb1fa862709f9d670c1b910141b1261bb7359 (diff) | |
| parent | 58cae5bebd73f80bd19af44a15ab08103d47192e (diff) | |
| download | monzero-gui-08c7ff2ca4927d8d9edd7028c02376ff0983a5ad.tar.gz monzero-gui-08c7ff2ca4927d8d9edd7028c02376ff0983a5ad.tar.xz monzero-gui-08c7ff2ca4927d8d9edd7028c02376ff0983a5ad.zip | |
Merge pull request #65
58cae5b Receive: allow integrated addresses from custom payment ids (moneromooo.monero)
| -rw-r--r-- | pages/Receive.qml | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/pages/Receive.qml b/pages/Receive.qml index dcb72fd7..4b4a0a93 100644 --- a/pages/Receive.qml +++ b/pages/Receive.qml @@ -41,16 +41,19 @@ Rectangle { property alias paymentIdText : paymentIdLine.text property alias integratedAddressText : integratedAddressLine.text - function updatePaymentId() { - var payment_id = appWindow.persistentSettings.payment_id - if (typeof appWindow.currentWallet !== 'undefined') { + function updatePaymentId(payment_id) { + if (typeof appWindow.currentWallet === 'undefined') + return + // generate a new one if not given as argument + if (typeof payment_id === 'undefined') { payment_id = appWindow.currentWallet.generatePaymentId() appWindow.persistentSettings.payment_id = payment_id - addressLine.text = appWindow.currentWallet.address - integratedAddressLine.text = appWindow.currentWallet.integratedAddress(payment_id) + paymentIdLine.text = payment_id } - - paymentIdLine.text = payment_id + addressLine.text = appWindow.currentWallet.address + integratedAddressLine.text = appWindow.currentWallet.integratedAddress(payment_id) + if (integratedAddressLine.text === "") + integratedAddressLine.text = qsTr("Invalid payment ID") } Clipboard { id: clipboard } @@ -148,6 +151,7 @@ Rectangle { fontSize: mainLayout.lineEditFontSize placeholderText: qsTr("Payment ID here") + translationManager.emptyString; readOnly: false + onTextChanged: updatePaymentId(paymentIdLine.text) width: mainLayout.editWidth Layout.fillWidth: true |
