Merge pull request #1768

02134c4 transfer: paste Payment URL to fill the payment form fields (xiphon)
This commit is contained in:
luigi1111
2018-12-01 14:03:51 -06:00
6 changed files with 75 additions and 18 deletions

View File

@@ -215,6 +215,18 @@ Rectangle {
wrapMode: Text.WrapAnywhere
addressValidation: true
onInputLabelLinkActivated: { appWindow.showPageRequest("AddressBook") }
pasteButton: true
onPaste: function(clipboardText) {
const parsed = walletManager.parse_uri_to_object(clipboardText);
if (!parsed.error) {
addressLine.text = parsed.address;
paymentIdLine.text = parsed.payment_id;
amountLine.text = parsed.amount;
descriptionLine.text = parsed.tx_description;
} else {
addressLine.text = clipboardText;
}
}
}
StandardButton {