2019-04-23 04:21:01 +02:00
|
|
|
// Copyright (c) 2014-2019, The Monero Project
|
2015-04-01 10:56:05 +02:00
|
|
|
//
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without modification, are
|
|
|
|
// permitted provided that the following conditions are met:
|
|
|
|
//
|
|
|
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
|
|
// conditions and the following disclaimer.
|
|
|
|
//
|
|
|
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
|
|
// of conditions and the following disclaimer in the documentation and/or other
|
|
|
|
// materials provided with the distribution.
|
|
|
|
//
|
|
|
|
// 3. Neither the name of the copyright holder nor the names of its contributors may be
|
|
|
|
// used to endorse or promote products derived from this software without specific
|
|
|
|
// prior written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
|
|
|
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
|
|
|
// THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
|
|
|
|
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
2014-07-07 19:08:30 +02:00
|
|
|
import QtQuick 2.0
|
2016-12-17 16:57:42 +01:00
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
import QtQuick.Dialogs 1.2
|
2017-12-06 14:09:37 +01:00
|
|
|
import moneroComponents.Clipboard 1.0
|
2016-10-02 20:40:40 +02:00
|
|
|
import moneroComponents.PendingTransaction 1.0
|
2016-11-26 15:47:25 +01:00
|
|
|
import moneroComponents.Wallet 1.0
|
2019-02-20 06:29:44 +01:00
|
|
|
import moneroComponents.NetworkType 1.0
|
2019-04-23 04:21:01 +02:00
|
|
|
import FontAwesome 1.0
|
2017-11-25 22:53:07 +01:00
|
|
|
import "../components"
|
2018-08-05 22:54:11 +02:00
|
|
|
import "../components" as MoneroComponents
|
2017-11-19 21:14:05 +01:00
|
|
|
import "." 1.0
|
2018-12-19 22:37:52 +01:00
|
|
|
import "../js/TxUtils.js" as TxUtils
|
2014-07-07 19:08:30 +02:00
|
|
|
|
2016-06-27 14:45:48 +02:00
|
|
|
|
2014-07-07 19:08:30 +02:00
|
|
|
Rectangle {
|
2016-08-23 15:07:52 +02:00
|
|
|
id: root
|
2016-11-06 13:33:17 +01:00
|
|
|
signal paymentClicked(string address, string paymentId, string amount, int mixinCount,
|
2016-11-06 00:19:28 +01:00
|
|
|
int priority, string description)
|
2016-11-08 21:23:50 +01:00
|
|
|
signal sweepUnmixableClicked()
|
2016-06-16 16:13:46 +02:00
|
|
|
|
2017-11-25 22:53:07 +01:00
|
|
|
color: "transparent"
|
2018-10-07 02:14:23 +02:00
|
|
|
property int mixin: 10 // (ring size 11)
|
2018-08-05 22:54:11 +02:00
|
|
|
property string warningContent: ""
|
2019-02-25 07:06:37 +01:00
|
|
|
property string sendButtonWarning: ""
|
2017-11-19 21:14:05 +01:00
|
|
|
property string startLinkText: qsTr("<style type='text/css'>a {text-decoration: none; color: #FF6C3C; font-size: 14px;}</style><font size='2'> (</font><a href='#'>Start daemon</a><font size='2'>)</font>") + translationManager.emptyString
|
2017-02-27 22:05:28 +01:00
|
|
|
property bool showAdvanced: false
|
2014-07-11 00:18:36 +02:00
|
|
|
|
2017-12-06 14:09:37 +01:00
|
|
|
Clipboard { id: clipboard }
|
2017-11-25 22:53:07 +01:00
|
|
|
|
2016-12-17 16:57:42 +01:00
|
|
|
function oa_message(text) {
|
|
|
|
oaPopup.title = qsTr("OpenAlias error") + translationManager.emptyString
|
|
|
|
oaPopup.text = text
|
|
|
|
oaPopup.icon = StandardIcon.Information
|
|
|
|
oaPopup.onCloseCallback = null
|
|
|
|
oaPopup.open()
|
|
|
|
}
|
|
|
|
|
2017-01-31 05:36:08 +01:00
|
|
|
function updateFromQrCode(address, payment_id, amount, tx_description, recipient_name) {
|
|
|
|
console.log("updateFromQrCode")
|
|
|
|
addressLine.text = address
|
2018-12-21 17:32:26 +01:00
|
|
|
setPaymentId(payment_id);
|
2017-01-31 05:36:08 +01:00
|
|
|
amountLine.text = amount
|
2018-12-21 17:32:26 +01:00
|
|
|
setDescription(recipient_name + " " + tx_description);
|
2017-01-31 05:36:08 +01:00
|
|
|
cameraUi.qrcode_decoded.disconnect(updateFromQrCode)
|
|
|
|
}
|
|
|
|
|
2018-12-21 17:32:26 +01:00
|
|
|
function setDescription(value) {
|
|
|
|
descriptionLine.text = value;
|
|
|
|
descriptionCheckbox.checked = descriptionLine.text != "";
|
|
|
|
}
|
|
|
|
|
|
|
|
function setPaymentId(value) {
|
|
|
|
paymentIdLine.text = value;
|
|
|
|
paymentIdCheckbox.checked = paymentIdLine.text != "";
|
|
|
|
}
|
|
|
|
|
2017-02-04 14:44:30 +01:00
|
|
|
function clearFields() {
|
|
|
|
addressLine.text = ""
|
2018-12-21 17:32:26 +01:00
|
|
|
setPaymentId("");
|
2017-02-04 14:44:30 +01:00
|
|
|
amountLine.text = ""
|
2019-02-25 07:06:37 +01:00
|
|
|
root.sendButtonWarning = ""
|
2018-12-21 17:32:26 +01:00
|
|
|
setDescription("");
|
2018-12-14 04:53:50 +01:00
|
|
|
priorityDropdown.currentIndex = 0
|
|
|
|
updatePriorityDropdown()
|
2017-02-04 14:44:30 +01:00
|
|
|
}
|
|
|
|
|
2016-12-17 16:57:42 +01:00
|
|
|
// Information dialog
|
|
|
|
StandardDialog {
|
|
|
|
// dynamically change onclose handler
|
|
|
|
property var onCloseCallback
|
|
|
|
id: oaPopup
|
|
|
|
cancelVisible: false
|
|
|
|
onAccepted: {
|
|
|
|
if (onCloseCallback) {
|
|
|
|
onCloseCallback()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-06-16 16:13:46 +02:00
|
|
|
|
2017-08-08 11:10:44 +02:00
|
|
|
ColumnLayout {
|
2016-12-10 20:56:35 +01:00
|
|
|
id: pageRoot
|
2018-12-08 16:55:29 +01:00
|
|
|
anchors.margins: (isMobile)? 17 * scaleRatio : 20 * scaleRatio
|
2017-12-06 14:09:37 +01:00
|
|
|
anchors.topMargin: 40 * scaleRatio
|
|
|
|
|
2017-01-12 20:53:27 +01:00
|
|
|
anchors.left: parent.left
|
2017-12-06 14:09:37 +01:00
|
|
|
anchors.top: parent.top
|
2017-01-12 20:53:27 +01:00
|
|
|
anchors.right: parent.right
|
2017-08-08 11:10:44 +02:00
|
|
|
|
2018-01-28 00:14:42 +01:00
|
|
|
spacing: 30 * scaleRatio
|
2017-11-19 21:14:05 +01:00
|
|
|
|
2018-08-05 22:54:11 +02:00
|
|
|
RowLayout {
|
|
|
|
visible: root.warningContent !== ""
|
2018-03-22 05:07:09 +01:00
|
|
|
|
2018-08-05 22:54:11 +02:00
|
|
|
MoneroComponents.WarningBox {
|
|
|
|
text: warningContent
|
|
|
|
onLinkActivated: {
|
|
|
|
appWindow.startDaemon(appWindow.persistentSettings.daemonFlags);
|
2018-03-22 05:07:09 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-08 11:10:44 +02:00
|
|
|
GridLayout {
|
|
|
|
columns: (isMobile)? 1 : 2
|
|
|
|
Layout.fillWidth: true
|
2017-12-09 00:01:10 +01:00
|
|
|
columnSpacing: 32
|
2017-12-06 14:09:37 +01:00
|
|
|
|
2017-08-08 11:10:44 +02:00
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillWidth: true
|
2018-12-28 16:34:53 +01:00
|
|
|
Layout.minimumWidth: 200 * scaleRatio
|
2017-02-27 22:05:28 +01:00
|
|
|
|
2018-12-28 16:34:53 +01:00
|
|
|
// Amount input
|
|
|
|
LineEdit {
|
|
|
|
id: amountLine
|
2018-03-22 05:07:09 +01:00
|
|
|
Layout.fillWidth: true
|
2018-12-28 16:34:53 +01:00
|
|
|
inlineIcon: true
|
2019-01-14 13:25:59 +01:00
|
|
|
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
|
|
|
|
Amount <font size='2'> ( </font> <a href='#'>Change account</a><font size='2'> )</font>")
|
|
|
|
+ translationManager.emptyString
|
|
|
|
onLabelLinkActivated: {
|
|
|
|
middlePanel.accountView.selectAndSend = true;
|
|
|
|
appWindow.showPageRequest("Account")
|
|
|
|
}
|
2019-02-25 21:17:54 +01:00
|
|
|
placeholderText: "0.00"
|
2018-12-28 16:34:53 +01:00
|
|
|
width: 100 * scaleRatio
|
|
|
|
fontBold: true
|
|
|
|
inlineButtonText: qsTr("All") + translationManager.emptyString
|
|
|
|
inlineButton.onClicked: amountLine.text = "(all)"
|
|
|
|
onTextChanged: {
|
|
|
|
if(amountLine.text.indexOf('.') === 0){
|
|
|
|
amountLine.text = '0' + amountLine.text;
|
2018-11-24 01:39:17 +01:00
|
|
|
}
|
2018-12-28 16:34:53 +01:00
|
|
|
}
|
2018-03-22 05:07:09 +01:00
|
|
|
|
2018-12-28 16:34:53 +01:00
|
|
|
validator: RegExpValidator {
|
|
|
|
regExp: /^(\d{1,8})?([\.]\d{1,12})?$/
|
2017-08-08 11:10:44 +02:00
|
|
|
}
|
2017-02-27 22:05:28 +01:00
|
|
|
}
|
2017-08-08 11:10:44 +02:00
|
|
|
}
|
2017-02-27 22:05:28 +01:00
|
|
|
|
2017-08-08 11:10:44 +02:00
|
|
|
ColumnLayout {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
Label {
|
|
|
|
id: transactionPriority
|
2018-12-28 16:34:53 +01:00
|
|
|
Layout.topMargin: 12 * scaleRatio
|
2017-08-08 11:10:44 +02:00
|
|
|
text: qsTr("Transaction priority") + translationManager.emptyString
|
2018-01-28 00:14:42 +01:00
|
|
|
fontBold: false
|
2018-12-12 22:31:24 +01:00
|
|
|
fontSize: 16 * scaleRatio
|
2017-08-08 11:10:44 +02:00
|
|
|
}
|
|
|
|
// Note: workaround for translations in listElements
|
|
|
|
// ListElement: cannot use script for property value, so
|
|
|
|
// code like this wont work:
|
|
|
|
// ListElement { column1: qsTr("LOW") + translationManager.emptyString ; column2: ""; priority: PendingTransaction.Priority_Low }
|
|
|
|
// For translations to work, the strings need to be listed in
|
|
|
|
// the file components/StandardDropdown.qml too.
|
2017-11-25 22:53:07 +01:00
|
|
|
|
2017-08-08 11:10:44 +02:00
|
|
|
// Priorites after v5
|
|
|
|
ListModel {
|
|
|
|
id: priorityModelV5
|
|
|
|
|
2018-07-16 16:55:40 +02:00
|
|
|
ListElement { column1: qsTr("Automatic") ; column2: ""; priority: 0}
|
2017-08-08 11:10:44 +02:00
|
|
|
ListElement { column1: qsTr("Slow (x0.25 fee)") ; column2: ""; priority: 1}
|
2018-01-17 04:03:27 +01:00
|
|
|
ListElement { column1: qsTr("Normal (x1 fee)") ; column2: ""; priority: 2 }
|
2017-08-08 11:10:44 +02:00
|
|
|
ListElement { column1: qsTr("Fast (x5 fee)") ; column2: ""; priority: 3 }
|
|
|
|
ListElement { column1: qsTr("Fastest (x41.5 fee)") ; column2: ""; priority: 4 }
|
|
|
|
}
|
|
|
|
|
|
|
|
StandardDropdown {
|
|
|
|
Layout.fillWidth: true
|
|
|
|
id: priorityDropdown
|
2018-12-28 16:34:53 +01:00
|
|
|
Layout.topMargin: 5 * scaleRatio
|
2017-08-08 11:10:44 +02:00
|
|
|
shadowReleasedColor: "#FF4304"
|
|
|
|
shadowPressedColor: "#B32D00"
|
2017-12-06 14:09:37 +01:00
|
|
|
releasedColor: "#363636"
|
|
|
|
pressedColor: "#202020"
|
2018-12-14 04:53:50 +01:00
|
|
|
currentIndex: 0
|
2017-08-08 11:10:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
// Make sure dropdown is on top
|
|
|
|
z: parent.z + 1
|
2017-02-27 22:05:28 +01:00
|
|
|
}
|
|
|
|
|
2017-12-06 14:09:37 +01:00
|
|
|
// recipient address input
|
|
|
|
RowLayout {
|
|
|
|
id: addressLineRow
|
2017-08-08 11:10:44 +02:00
|
|
|
Layout.fillWidth: true
|
2017-11-25 22:53:07 +01:00
|
|
|
|
2018-03-21 02:39:09 +01:00
|
|
|
LineEditMulti {
|
2017-12-09 00:01:10 +01:00
|
|
|
id: addressLine
|
|
|
|
spacing: 0
|
2018-03-24 21:06:12 +01:00
|
|
|
fontBold: true
|
2018-03-21 23:56:53 +01:00
|
|
|
labelText: qsTr("<style type='text/css'>a {text-decoration: none; color: #858585; font-size: 14px;}</style>\
|
2017-12-09 00:01:10 +01:00
|
|
|
Address <font size='2'> ( </font> <a href='#'>Address book</a><font size='2'> )</font>")
|
|
|
|
+ translationManager.emptyString
|
2018-04-23 01:26:11 +02:00
|
|
|
labelButtonText: qsTr("Resolve") + translationManager.emptyString
|
2019-02-20 06:29:44 +01:00
|
|
|
placeholderText: {
|
|
|
|
if(persistentSettings.nettype == NetworkType.MAINNET){
|
|
|
|
return "4.. / 8.. / OpenAlias";
|
|
|
|
} else if (persistentSettings.nettype == NetworkType.STAGENET){
|
|
|
|
return "5.. / 7..";
|
|
|
|
} else if(persistentSettings.nettype == NetworkType.TESTNET){
|
|
|
|
return "9.. / B..";
|
|
|
|
}
|
|
|
|
}
|
2018-07-18 15:00:53 +02:00
|
|
|
wrapMode: Text.WrapAnywhere
|
|
|
|
addressValidation: true
|
2019-01-15 17:48:22 +01:00
|
|
|
onInputLabelLinkActivated: {
|
|
|
|
middlePanel.addressBookView.selectAndSend = true;
|
|
|
|
appWindow.showPageRequest("AddressBook");
|
|
|
|
}
|
2018-11-30 04:51:03 +01:00
|
|
|
pasteButton: true
|
|
|
|
onPaste: function(clipboardText) {
|
|
|
|
const parsed = walletManager.parse_uri_to_object(clipboardText);
|
|
|
|
if (!parsed.error) {
|
|
|
|
addressLine.text = parsed.address;
|
2018-12-21 17:32:26 +01:00
|
|
|
setPaymentId(parsed.payment_id);
|
2018-11-30 04:51:03 +01:00
|
|
|
amountLine.text = parsed.amount;
|
2018-12-21 17:32:26 +01:00
|
|
|
setDescription(parsed.tx_description);
|
2018-11-30 04:51:03 +01:00
|
|
|
} else {
|
|
|
|
addressLine.text = clipboardText;
|
|
|
|
}
|
|
|
|
}
|
2019-04-23 04:21:01 +02:00
|
|
|
inlineButton.text: FontAwesome.qrcode
|
|
|
|
inlineButton.fontPixelSize: 22
|
|
|
|
inlineButton.fontFamily: FontAwesome.fontFamily
|
|
|
|
inlineButton.textColor: MoneroComponents.Style.defaultFontColor
|
2018-12-12 22:31:24 +01:00
|
|
|
inlineButton.buttonColor: MoneroComponents.Style.orange
|
|
|
|
inlineButton.onClicked: {
|
2017-12-06 14:09:37 +01:00
|
|
|
cameraUi.state = "Capture"
|
|
|
|
cameraUi.qrcode_decoded.connect(updateFromQrCode)
|
|
|
|
}
|
2018-12-12 22:31:24 +01:00
|
|
|
inlineButtonVisible : appWindow.qrScannerEnabled && !addressLine.text
|
2017-08-08 11:10:44 +02:00
|
|
|
}
|
2017-12-06 14:09:37 +01:00
|
|
|
}
|
2017-02-27 22:05:28 +01:00
|
|
|
|
2018-04-22 03:48:31 +02:00
|
|
|
StandardButton {
|
|
|
|
id: resolveButton
|
2018-12-12 22:31:24 +01:00
|
|
|
width: 80 * scaleRatio
|
2018-04-22 03:48:31 +02:00
|
|
|
text: qsTr("Resolve") + translationManager.emptyString
|
2018-12-19 22:37:52 +01:00
|
|
|
visible: TxUtils.isValidOpenAliasAddress(addressLine.text)
|
|
|
|
enabled : visible
|
2018-04-22 03:48:31 +02:00
|
|
|
onClicked: {
|
|
|
|
var result = walletManager.resolveOpenAlias(addressLine.text)
|
|
|
|
if (result) {
|
|
|
|
var parts = result.split("|")
|
|
|
|
if (parts.length == 2) {
|
2018-05-02 03:29:47 +02:00
|
|
|
var address_ok = walletManager.addressValid(parts[1], appWindow.persistentSettings.nettype)
|
2018-04-22 03:48:31 +02:00
|
|
|
if (parts[0] === "true") {
|
|
|
|
if (address_ok) {
|
2019-02-01 19:53:01 +01:00
|
|
|
// prepend openalias to description
|
|
|
|
descriptionLine.text = descriptionLine.text ? addressLine.text + " " + descriptionLine.text : addressLine.text
|
|
|
|
descriptionCheckbox.checked = true
|
2018-04-22 03:48:31 +02:00
|
|
|
addressLine.text = parts[1]
|
|
|
|
}
|
|
|
|
else
|
|
|
|
oa_message(qsTr("No valid address found at this OpenAlias address"))
|
|
|
|
}
|
|
|
|
else if (parts[0] === "false") {
|
|
|
|
if (address_ok) {
|
|
|
|
addressLine.text = parts[1]
|
|
|
|
oa_message(qsTr("Address found, but the DNSSEC signatures could not be verified, so this address may be spoofed"))
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
oa_message(qsTr("No valid address found at this OpenAlias address, but the DNSSEC signatures could not be verified, so this may be spoofed"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
oa_message(qsTr("Internal error"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
oa_message(qsTr("Internal error"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
oa_message(qsTr("No address found"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-12-21 17:32:26 +01:00
|
|
|
ColumnLayout {
|
2018-12-27 19:12:40 +01:00
|
|
|
visible: appWindow.persistentSettings.showPid || paymentIdCheckbox.checked
|
|
|
|
|
2018-12-21 17:32:26 +01:00
|
|
|
CheckBox {
|
|
|
|
id: paymentIdCheckbox
|
|
|
|
border: false
|
|
|
|
checkedIcon: "qrc:///images/minus-white.png"
|
|
|
|
uncheckedIcon: "qrc:///images/plus-white.png"
|
|
|
|
fontSize: paymentIdLine.labelFontSize
|
|
|
|
iconOnTheLeft: false
|
|
|
|
Layout.fillWidth: true
|
2019-02-12 11:41:33 +01:00
|
|
|
text: qsTr("Payment ID <font size='2'>( Optional )</font>") + translationManager.emptyString
|
2018-12-21 17:32:26 +01:00
|
|
|
onClicked: {
|
|
|
|
if (!paymentIdCheckbox.checked) {
|
|
|
|
paymentIdLine.text = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-08-08 11:10:44 +02:00
|
|
|
// payment id input
|
2018-07-18 15:00:53 +02:00
|
|
|
LineEditMulti {
|
2017-08-08 11:10:44 +02:00
|
|
|
id: paymentIdLine
|
2018-03-24 21:06:12 +01:00
|
|
|
fontBold: true
|
2018-12-27 01:18:19 +01:00
|
|
|
placeholderText: qsTr("64 hexadecimal characters") + translationManager.emptyString
|
2017-08-08 11:10:44 +02:00
|
|
|
Layout.fillWidth: true
|
2018-07-18 15:00:53 +02:00
|
|
|
wrapMode: Text.WrapAnywhere
|
|
|
|
addressValidation: false
|
2018-12-21 17:32:26 +01:00
|
|
|
visible: paymentIdCheckbox.checked
|
2017-08-08 11:10:44 +02:00
|
|
|
}
|
2017-12-06 14:09:37 +01:00
|
|
|
}
|
2017-02-27 22:05:28 +01:00
|
|
|
|
2018-12-21 17:32:26 +01:00
|
|
|
ColumnLayout {
|
|
|
|
CheckBox {
|
|
|
|
id: descriptionCheckbox
|
|
|
|
border: false
|
|
|
|
checkedIcon: "qrc:///images/minus-white.png"
|
|
|
|
uncheckedIcon: "qrc:///images/plus-white.png"
|
|
|
|
fontSize: descriptionLine.labelFontSize
|
|
|
|
iconOnTheLeft: false
|
|
|
|
Layout.fillWidth: true
|
|
|
|
text: qsTr("Description <font size='2'>( Optional )</font>") + translationManager.emptyString
|
|
|
|
onClicked: {
|
|
|
|
if (!descriptionCheckbox.checked) {
|
|
|
|
descriptionLine.text = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-07-18 15:00:53 +02:00
|
|
|
LineEditMulti {
|
2017-08-08 11:10:44 +02:00
|
|
|
id: descriptionLine
|
|
|
|
placeholderText: qsTr("Saved to local wallet history") + translationManager.emptyString
|
|
|
|
Layout.fillWidth: true
|
2018-12-21 17:32:26 +01:00
|
|
|
visible: descriptionCheckbox.checked
|
2019-04-16 13:25:01 +02:00
|
|
|
onTextChanged: {
|
|
|
|
paymentIdWarningBox.visible = walletManager.paymentIdValid(text) && !persistentSettings.showPid
|
|
|
|
}
|
2017-08-08 11:10:44 +02:00
|
|
|
}
|
2017-12-06 14:09:37 +01:00
|
|
|
}
|
2017-02-27 22:05:28 +01:00
|
|
|
|
2019-02-25 07:06:37 +01:00
|
|
|
MoneroComponents.WarningBox {
|
2019-04-16 13:25:01 +02:00
|
|
|
// @TODO: remove after pid removal hardfork
|
|
|
|
id: paymentIdWarningBox
|
|
|
|
text: qsTr("You can enable transfers with payment ID on the settings page.") + translationManager.emptyString;
|
|
|
|
visible: false
|
|
|
|
}
|
|
|
|
|
|
|
|
MoneroComponents.WarningBox {
|
2019-02-25 07:06:37 +01:00
|
|
|
id: sendButtonWarningBox
|
|
|
|
text: root.sendButtonWarning
|
|
|
|
visible: root.sendButtonWarning !== ""
|
|
|
|
}
|
|
|
|
|
2017-12-06 14:09:37 +01:00
|
|
|
RowLayout {
|
2017-03-08 20:54:11 +01:00
|
|
|
StandardButton {
|
|
|
|
id: sendButton
|
2018-04-10 22:29:22 +02:00
|
|
|
rightIcon: "../images/rightArrow.png"
|
|
|
|
rightIconInactive: "../images/rightArrowInactive.png"
|
2018-01-28 00:14:42 +01:00
|
|
|
Layout.topMargin: 4 * scaleRatio
|
2017-03-08 20:54:11 +01:00
|
|
|
text: qsTr("Send") + translationManager.emptyString
|
2019-02-25 07:06:37 +01:00
|
|
|
enabled: {
|
|
|
|
updateSendButton()
|
2018-03-27 21:12:10 +02:00
|
|
|
}
|
2017-03-08 20:54:11 +01:00
|
|
|
onClicked: {
|
|
|
|
console.log("Transfer: paymentClicked")
|
2017-12-04 15:41:49 +01:00
|
|
|
var priority = priorityModelV5.get(priorityDropdown.currentIndex).priority
|
2017-03-08 20:54:11 +01:00
|
|
|
console.log("priority: " + priority)
|
|
|
|
console.log("amount: " + amountLine.text)
|
|
|
|
addressLine.text = addressLine.text.trim()
|
2018-12-21 17:32:26 +01:00
|
|
|
setPaymentId(paymentIdLine.text.trim());
|
2018-10-07 02:14:23 +02:00
|
|
|
root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, root.mixin, priority, descriptionLine.text)
|
2017-03-08 20:54:11 +01:00
|
|
|
}
|
2017-02-27 22:05:28 +01:00
|
|
|
}
|
|
|
|
}
|
2017-03-08 20:54:11 +01:00
|
|
|
|
2018-03-05 17:19:45 +01:00
|
|
|
function checkInformation(amount, address, payment_id, nettype) {
|
2017-08-08 11:10:44 +02:00
|
|
|
address = address.trim()
|
|
|
|
payment_id = payment_id.trim()
|
|
|
|
|
|
|
|
var amount_ok = amount.length > 0
|
2018-03-05 17:19:45 +01:00
|
|
|
var address_ok = walletManager.addressValid(address, nettype)
|
2018-12-27 01:18:19 +01:00
|
|
|
var payment_id_ok = payment_id.length == 0 || (payment_id.length == 64 && walletManager.paymentIdValid(payment_id))
|
2018-03-05 17:19:45 +01:00
|
|
|
var ipid = walletManager.paymentIdFromAddress(address, nettype)
|
2017-08-08 11:10:44 +02:00
|
|
|
if (ipid.length > 0 && payment_id.length > 0)
|
|
|
|
payment_id_ok = false
|
|
|
|
|
|
|
|
addressLine.error = !address_ok
|
|
|
|
amountLine.error = !amount_ok
|
|
|
|
paymentIdLine.error = !payment_id_ok
|
|
|
|
|
|
|
|
return amount_ok && address_ok && payment_id_ok
|
|
|
|
}
|
2017-03-08 20:54:11 +01:00
|
|
|
|
2017-01-12 20:53:27 +01:00
|
|
|
} // pageRoot
|
2016-11-26 15:47:25 +01:00
|
|
|
|
|
|
|
Rectangle {
|
2018-01-28 00:14:42 +01:00
|
|
|
id: desaturate
|
2016-11-26 15:47:25 +01:00
|
|
|
color:"black"
|
|
|
|
anchors.fill: parent
|
|
|
|
opacity: 0.1
|
2016-12-10 20:56:35 +01:00
|
|
|
visible: (pageRoot.enabled)? 0 : 1;
|
2016-11-26 15:47:25 +01:00
|
|
|
}
|
2017-01-12 20:53:27 +01:00
|
|
|
|
|
|
|
ColumnLayout {
|
|
|
|
anchors.top: pageRoot.bottom
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
2018-12-08 16:55:29 +01:00
|
|
|
anchors.margins: (isMobile)? 17 * scaleRatio : 20 * scaleRatio
|
2018-01-28 00:14:42 +01:00
|
|
|
anchors.topMargin: 32 * scaleRatio
|
2017-12-09 00:01:10 +01:00
|
|
|
spacing: 26 * scaleRatio
|
2017-01-12 20:53:27 +01:00
|
|
|
enabled: !viewOnly || pageRoot.enabled
|
|
|
|
|
|
|
|
RowLayout {
|
2019-01-14 01:02:44 +01:00
|
|
|
visible: appWindow.walletMode >= 2
|
2018-01-28 00:14:42 +01:00
|
|
|
CheckBox2 {
|
2017-02-27 22:05:28 +01:00
|
|
|
id: showAdvancedCheckbox
|
|
|
|
checked: persistentSettings.transferShowAdvanced
|
|
|
|
onClicked: {
|
|
|
|
persistentSettings.transferShowAdvanced = !persistentSettings.transferShowAdvanced
|
|
|
|
}
|
2018-01-28 00:14:42 +01:00
|
|
|
text: qsTr("Advanced options") + translationManager.emptyString
|
2017-01-12 20:53:27 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-04-03 18:51:55 +02:00
|
|
|
GridLayout {
|
2019-01-14 01:02:44 +01:00
|
|
|
visible: persistentSettings.transferShowAdvanced && appWindow.walletMode >= 2
|
2017-04-03 18:51:55 +02:00
|
|
|
columns: (isMobile) ? 2 : 6
|
|
|
|
|
2017-01-12 20:53:27 +01:00
|
|
|
StandardButton {
|
|
|
|
id: sweepUnmixableButton
|
2017-02-27 23:02:33 +01:00
|
|
|
text: qsTr("Sweep Unmixable") + translationManager.emptyString
|
2017-01-12 20:53:27 +01:00
|
|
|
enabled : pageRoot.enabled
|
2018-01-28 00:14:42 +01:00
|
|
|
small: true
|
2017-01-12 20:53:27 +01:00
|
|
|
onClicked: {
|
|
|
|
console.log("Transfer: sweepUnmixableClicked")
|
|
|
|
root.sweepUnmixableClicked()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StandardButton {
|
|
|
|
id: saveTxButton
|
2017-03-29 01:15:55 +02:00
|
|
|
text: qsTr("Create tx file") + translationManager.emptyString
|
2017-01-12 20:53:27 +01:00
|
|
|
visible: appWindow.viewOnly
|
2018-03-05 17:19:45 +01:00
|
|
|
enabled: pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)
|
2018-01-28 00:14:42 +01:00
|
|
|
small: true
|
2017-01-12 20:53:27 +01:00
|
|
|
onClicked: {
|
|
|
|
console.log("Transfer: saveTx Clicked")
|
2017-12-04 15:41:49 +01:00
|
|
|
var priority = priorityModelV5.get(priorityDropdown.currentIndex).priority
|
2017-01-12 20:53:27 +01:00
|
|
|
console.log("priority: " + priority)
|
|
|
|
console.log("amount: " + amountLine.text)
|
|
|
|
addressLine.text = addressLine.text.trim()
|
2018-12-21 17:32:26 +01:00
|
|
|
setPaymentId(paymentIdLine.text.trim());
|
2018-10-07 02:14:23 +02:00
|
|
|
root.paymentClicked(addressLine.text, paymentIdLine.text, amountLine.text, root.mixin, priority, descriptionLine.text)
|
2017-01-12 20:53:27 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StandardButton {
|
|
|
|
id: signTxButton
|
2017-03-19 03:57:48 +01:00
|
|
|
text: qsTr("Sign tx file") + translationManager.emptyString
|
2018-01-28 00:14:42 +01:00
|
|
|
small: true
|
2017-01-12 20:53:27 +01:00
|
|
|
visible: !appWindow.viewOnly
|
|
|
|
onClicked: {
|
|
|
|
console.log("Transfer: sign tx clicked")
|
|
|
|
signTxDialog.open();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StandardButton {
|
|
|
|
id: submitTxButton
|
2017-03-19 03:57:48 +01:00
|
|
|
text: qsTr("Submit tx file") + translationManager.emptyString
|
2018-01-28 00:14:42 +01:00
|
|
|
small: true
|
2017-01-12 20:53:27 +01:00
|
|
|
visible: appWindow.viewOnly
|
|
|
|
enabled: pageRoot.enabled
|
|
|
|
onClicked: {
|
|
|
|
console.log("Transfer: submit tx clicked")
|
|
|
|
submitTxDialog.open();
|
|
|
|
}
|
|
|
|
}
|
2018-05-14 23:43:52 +02:00
|
|
|
|
|
|
|
StandardButton {
|
|
|
|
id: exportKeyImagesButton
|
|
|
|
text: qsTr("Export key images") + translationManager.emptyString
|
|
|
|
small: true
|
|
|
|
visible: !appWindow.viewOnly
|
|
|
|
enabled: pageRoot.enabled
|
|
|
|
onClicked: {
|
|
|
|
console.log("Transfer: export key images clicked")
|
|
|
|
exportKeyImagesDialog.open();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
StandardButton {
|
|
|
|
id: importKeyImagesButton
|
|
|
|
text: qsTr("Import key images") + translationManager.emptyString
|
|
|
|
small: true
|
|
|
|
visible: appWindow.viewOnly && walletManager.isDaemonLocal(appWindow.currentDaemonAddress)
|
|
|
|
enabled: pageRoot.enabled
|
|
|
|
onClicked: {
|
|
|
|
console.log("Transfer: import key images clicked")
|
|
|
|
importKeyImagesDialog.open();
|
|
|
|
}
|
|
|
|
}
|
2017-01-12 20:53:27 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//SignTxDialog
|
|
|
|
FileDialog {
|
|
|
|
id: signTxDialog
|
2017-03-09 01:28:24 +01:00
|
|
|
title: qsTr("Please choose a file") + translationManager.emptyString
|
2017-01-12 20:53:27 +01:00
|
|
|
folder: "file://" +moneroAccountsDir
|
|
|
|
nameFilters: [ "Unsigned transfers (*)"]
|
|
|
|
|
|
|
|
onAccepted: {
|
|
|
|
var path = walletManager.urlToLocalPath(fileUrl);
|
|
|
|
// Load the unsigned tx from file
|
|
|
|
var transaction = currentWallet.loadTxFile(path);
|
|
|
|
|
|
|
|
if (transaction.status !== PendingTransaction.Status_Ok) {
|
|
|
|
console.error("Can't load unsigned transaction: ", transaction.errorString);
|
|
|
|
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
|
|
|
informationPopup.text = qsTr("Can't load unsigned transaction: ") + transaction.errorString
|
|
|
|
informationPopup.icon = StandardIcon.Critical
|
|
|
|
informationPopup.onCloseCallback = null
|
|
|
|
informationPopup.open();
|
|
|
|
// deleting transaction object, we don't want memleaks
|
|
|
|
transaction.destroy();
|
|
|
|
} else {
|
|
|
|
confirmationDialog.text = qsTr("\nNumber of transactions: ") + transaction.txCount
|
|
|
|
for (var i = 0; i < transaction.txCount; ++i) {
|
|
|
|
confirmationDialog.text += qsTr("\nTransaction #%1").arg(i+1)
|
|
|
|
+qsTr("\nRecipient: ") + transaction.recipientAddress[i]
|
|
|
|
+ (transaction.paymentId[i] == "" ? "" : qsTr("\n\payment ID: ") + transaction.paymentId[i])
|
|
|
|
+ qsTr("\nAmount: ") + walletManager.displayAmount(transaction.amount(i))
|
|
|
|
+ qsTr("\nFee: ") + walletManager.displayAmount(transaction.fee(i))
|
2018-05-22 00:44:38 +02:00
|
|
|
+ qsTr("\nRingsize: ") + (transaction.mixin(i)+1)
|
2017-01-12 20:53:27 +01:00
|
|
|
|
|
|
|
// TODO: add descriptions to unsigned_tx_set?
|
|
|
|
// + (transactionDescription === "" ? "" : (qsTr("\n\nDescription: ") + transactionDescription))
|
|
|
|
+ translationManager.emptyString
|
|
|
|
if (i > 0) {
|
|
|
|
confirmationDialog.text += "\n\n"
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(transaction.confirmationMessage);
|
|
|
|
|
|
|
|
// Show confirmation dialog
|
|
|
|
confirmationDialog.title = qsTr("Confirmation") + translationManager.emptyString
|
|
|
|
confirmationDialog.icon = StandardIcon.Question
|
|
|
|
confirmationDialog.onAcceptedCallback = function() {
|
|
|
|
transaction.sign(path+"_signed");
|
|
|
|
transaction.destroy();
|
|
|
|
};
|
|
|
|
confirmationDialog.onRejectedCallback = transaction.destroy;
|
|
|
|
|
|
|
|
confirmationDialog.open()
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
onRejected: {
|
|
|
|
// File dialog closed
|
|
|
|
console.log("Canceled")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//SignTxDialog
|
|
|
|
FileDialog {
|
|
|
|
id: submitTxDialog
|
2017-03-09 01:28:24 +01:00
|
|
|
title: qsTr("Please choose a file") + translationManager.emptyString
|
2017-01-12 20:53:27 +01:00
|
|
|
folder: "file://" +moneroAccountsDir
|
|
|
|
nameFilters: [ "signed transfers (*)"]
|
|
|
|
|
|
|
|
onAccepted: {
|
|
|
|
if(!currentWallet.submitTxFile(walletManager.urlToLocalPath(fileUrl))){
|
|
|
|
informationPopup.title = qsTr("Error") + translationManager.emptyString;
|
|
|
|
informationPopup.text = qsTr("Can't submit transaction: ") + currentWallet.errorString
|
|
|
|
informationPopup.icon = StandardIcon.Critical
|
|
|
|
informationPopup.onCloseCallback = null
|
|
|
|
informationPopup.open();
|
|
|
|
} else {
|
|
|
|
informationPopup.title = qsTr("Information") + translationManager.emptyString
|
2018-03-23 23:53:29 +01:00
|
|
|
informationPopup.text = qsTr("Monero sent successfully") + translationManager.emptyString
|
2017-01-12 20:53:27 +01:00
|
|
|
informationPopup.icon = StandardIcon.Information
|
|
|
|
informationPopup.onCloseCallback = null
|
|
|
|
informationPopup.open();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onRejected: {
|
|
|
|
console.log("Canceled")
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2018-05-14 23:43:52 +02:00
|
|
|
|
|
|
|
//ExportKeyImagesDialog
|
|
|
|
FileDialog {
|
|
|
|
id: exportKeyImagesDialog
|
|
|
|
selectMultiple: false
|
|
|
|
selectExisting: false
|
|
|
|
onAccepted: {
|
|
|
|
console.log(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl))
|
|
|
|
currentWallet.exportKeyImages(walletManager.urlToLocalPath(exportKeyImagesDialog.fileUrl));
|
|
|
|
}
|
|
|
|
onRejected: {
|
|
|
|
console.log("Canceled");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//ImportKeyImagesDialog
|
|
|
|
FileDialog {
|
|
|
|
id: importKeyImagesDialog
|
|
|
|
selectMultiple: false
|
|
|
|
selectExisting: true
|
|
|
|
title: qsTr("Please choose a file") + translationManager.emptyString
|
|
|
|
onAccepted: {
|
|
|
|
console.log(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl))
|
|
|
|
currentWallet.importKeyImages(walletManager.urlToLocalPath(importKeyImagesDialog.fileUrl));
|
|
|
|
}
|
|
|
|
onRejected: {
|
|
|
|
console.log("Canceled");
|
|
|
|
}
|
|
|
|
}
|
2016-11-26 15:47:25 +01:00
|
|
|
|
2018-03-22 05:07:09 +01:00
|
|
|
|
2016-11-26 15:47:25 +01:00
|
|
|
|
|
|
|
Component.onCompleted: {
|
|
|
|
//Disable password page until enabled by updateStatus
|
2016-12-10 20:56:35 +01:00
|
|
|
pageRoot.enabled = false
|
2016-11-26 15:47:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// fires on every page load
|
|
|
|
function onPageCompleted() {
|
|
|
|
console.log("transfer page loaded")
|
|
|
|
updateStatus();
|
2017-03-23 22:54:35 +01:00
|
|
|
updatePriorityDropdown()
|
|
|
|
}
|
|
|
|
|
|
|
|
function updatePriorityDropdown() {
|
2017-08-19 11:30:50 +02:00
|
|
|
priorityDropdown.dataModel = priorityModelV5;
|
|
|
|
priorityDropdown.update()
|
2016-11-26 15:47:25 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//TODO: Add daemon sync status
|
|
|
|
//TODO: enable send page when we're connected and daemon is synced
|
|
|
|
|
|
|
|
function updateStatus() {
|
2019-01-14 01:02:44 +01:00
|
|
|
var messageNotConnected = qsTr("Wallet is not connected to daemon.");
|
|
|
|
if(appWindow.walletMode >= 2) messageNotConnected += root.startLinkText;
|
2018-03-22 05:07:09 +01:00
|
|
|
pageRoot.enabled = true;
|
2016-11-26 15:47:25 +01:00
|
|
|
if(typeof currentWallet === "undefined") {
|
2019-01-14 01:02:44 +01:00
|
|
|
root.warningContent = messageNotConnected;
|
2016-11-26 15:47:25 +01:00
|
|
|
return;
|
2017-01-04 17:25:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
if (currentWallet.viewOnly) {
|
2018-03-22 05:07:09 +01:00
|
|
|
// warningText.text = qsTr("Wallet is view only.")
|
2017-01-12 20:53:27 +01:00
|
|
|
//return;
|
2016-11-26 15:47:25 +01:00
|
|
|
}
|
2018-03-22 05:07:09 +01:00
|
|
|
//pageRoot.enabled = false;
|
2016-11-26 15:47:25 +01:00
|
|
|
|
2017-02-23 19:47:58 +01:00
|
|
|
switch (currentWallet.connected()) {
|
2016-11-26 15:47:25 +01:00
|
|
|
case Wallet.ConnectionStatus_Disconnected:
|
2019-01-14 01:02:44 +01:00
|
|
|
root.warningContent = messageNotConnected;
|
2016-11-26 15:47:25 +01:00
|
|
|
break
|
|
|
|
case Wallet.ConnectionStatus_WrongVersion:
|
2018-08-05 22:54:11 +02:00
|
|
|
root.warningContent = qsTr("Connected daemon is not compatible with GUI. \n" +
|
2016-11-26 15:47:25 +01:00
|
|
|
"Please upgrade or connect to another daemon")
|
|
|
|
break
|
|
|
|
default:
|
|
|
|
if(!appWindow.daemonSynced){
|
2019-01-14 01:02:44 +01:00
|
|
|
root.warningContent = qsTr("Waiting on daemon synchronization to finish.")
|
2016-11-26 15:47:25 +01:00
|
|
|
} else {
|
|
|
|
// everything OK, enable transfer page
|
2017-08-08 11:10:44 +02:00
|
|
|
// Light wallet is always ready
|
2016-12-10 20:56:35 +01:00
|
|
|
pageRoot.enabled = true;
|
2018-08-05 22:54:11 +02:00
|
|
|
root.warningContent = "";
|
2016-11-26 15:47:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2016-12-10 02:01:04 +01:00
|
|
|
|
|
|
|
// Popuplate fields from addressbook.
|
|
|
|
function sendTo(address, paymentId, description){
|
|
|
|
addressLine.text = address
|
2018-12-21 17:32:26 +01:00
|
|
|
setPaymentId(paymentId);
|
|
|
|
setDescription(description);
|
2016-12-10 02:01:04 +01:00
|
|
|
}
|
2019-02-25 07:06:37 +01:00
|
|
|
|
|
|
|
function updateSendButton(){
|
|
|
|
// reset message
|
|
|
|
root.sendButtonWarning = "";
|
|
|
|
|
|
|
|
// Currently opened wallet is not view-only
|
|
|
|
if(appWindow.viewOnly){
|
|
|
|
root.sendButtonWarning = qsTr("Wallet is view-only and sends are not possible.") + translationManager.emptyString;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// There are sufficient unlocked funds available
|
|
|
|
if(parseFloat(amountLine.text) > parseFloat(middlePanel.unlockedBalanceText)){
|
|
|
|
root.sendButtonWarning = qsTr("Amount is more than unlocked balance.") + translationManager.emptyString;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// There is no warning box displayed
|
|
|
|
if(root.warningContent !== ""){
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
// The transactional information is correct
|
|
|
|
if(!pageRoot.checkInformation(amountLine.text, addressLine.text, paymentIdLine.text, appWindow.persistentSettings.nettype)){
|
|
|
|
if(amountLine.text && addressLine.text)
|
|
|
|
root.sendButtonWarning = qsTr("Transaction information is incorrect.") + translationManager.emptyString;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
2014-07-07 19:08:30 +02:00
|
|
|
}
|