2018-01-07 06:20:45 +01:00
|
|
|
// Copyright (c) 2014-2018, 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-16 18:04:34 +02:00
|
|
|
import QtQuick 2.0
|
2016-10-02 20:40:40 +02:00
|
|
|
import moneroComponents.Clipboard 1.0
|
2016-12-24 17:21:39 +01:00
|
|
|
import moneroComponents.AddressBookModel 1.0
|
2018-03-31 03:25:20 +02:00
|
|
|
|
2017-12-08 22:28:12 +01:00
|
|
|
import "../components" as MoneroComponents
|
2018-03-21 01:35:34 +01:00
|
|
|
import "../js/TxUtils.js" as TxUtils
|
2016-10-04 22:12:58 +02:00
|
|
|
|
2014-07-16 18:04:34 +02:00
|
|
|
ListView {
|
|
|
|
id: listView
|
|
|
|
clip: true
|
|
|
|
boundsBehavior: ListView.StopAtBounds
|
2016-10-04 22:12:58 +02:00
|
|
|
property var previousItem
|
2016-11-05 12:19:47 +01:00
|
|
|
property int rowSpacing: 12
|
2016-12-24 17:21:39 +01:00
|
|
|
property var addressBookModel: null
|
2014-07-16 18:04:34 +02:00
|
|
|
|
2018-03-07 01:01:53 +01:00
|
|
|
function buildTxDetailsString(tx_id, paymentId, tx_key,tx_note, destinations, rings) {
|
2016-11-06 19:28:12 +01:00
|
|
|
var trStart = '<tr><td width="85" style="padding-top:5px"><b>',
|
|
|
|
trMiddle = '</b></td><td style="padding-left:10px;padding-top:5px;">',
|
|
|
|
trEnd = "</td></tr>";
|
|
|
|
|
|
|
|
return '<table border="0">'
|
|
|
|
+ (tx_id ? trStart + qsTr("Tx ID:") + trMiddle + tx_id + trEnd : "")
|
|
|
|
+ (paymentId ? trStart + qsTr("Payment ID:") + trMiddle + paymentId + trEnd : "")
|
|
|
|
+ (tx_key ? trStart + qsTr("Tx key:") + trMiddle + tx_key + trEnd : "")
|
|
|
|
+ (tx_note ? trStart + qsTr("Tx note:") + trMiddle + tx_note + trEnd : "")
|
2016-12-03 12:08:39 +01:00
|
|
|
+ (destinations ? trStart + qsTr("Destinations:") + trMiddle + destinations + trEnd : "")
|
2018-03-07 01:01:53 +01:00
|
|
|
+ (rings ? trStart + qsTr("Rings:") + trMiddle + rings + trEnd : "")
|
2016-11-06 19:28:12 +01:00
|
|
|
+ "</table>"
|
|
|
|
+ translationManager.emptyString;
|
|
|
|
}
|
|
|
|
|
2016-12-24 17:21:39 +01:00
|
|
|
function lookupPaymentID(paymentId) {
|
|
|
|
if (!addressBookModel)
|
|
|
|
return ""
|
|
|
|
var idx = addressBookModel.lookupPaymentID(paymentId)
|
|
|
|
if (idx < 0)
|
|
|
|
return ""
|
|
|
|
idx = addressBookModel.index(idx, 0)
|
|
|
|
return addressBookModel.data(idx, AddressBookModel.AddressBookDescriptionRole)
|
|
|
|
}
|
2016-11-06 19:28:12 +01:00
|
|
|
|
2014-07-23 11:25:27 +02:00
|
|
|
footer: Rectangle {
|
2017-12-27 00:53:21 +01:00
|
|
|
height: 127 * scaleRatio
|
2014-07-23 11:25:27 +02:00
|
|
|
width: listView.width
|
2017-12-27 00:53:21 +01:00
|
|
|
color: "transparent"
|
2014-07-23 11:25:27 +02:00
|
|
|
|
|
|
|
Text {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
font.family: "Arial"
|
|
|
|
font.pixelSize: 14
|
|
|
|
color: "#545454"
|
2016-07-20 21:28:11 +02:00
|
|
|
text: qsTr("No more results") + translationManager.emptyString
|
2014-07-23 11:25:27 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-07-16 18:04:34 +02:00
|
|
|
delegate: Rectangle {
|
|
|
|
id: delegate
|
2017-12-27 00:53:21 +01:00
|
|
|
property bool collapsed: index ? false : true
|
|
|
|
height: collapsed ? 180 * scaleRatio : 70 * scaleRatio
|
2014-07-16 18:04:34 +02:00
|
|
|
width: listView.width
|
2018-03-21 02:12:02 +01:00
|
|
|
color: "transparent"
|
2016-11-06 19:28:12 +01:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
function collapse(){
|
|
|
|
delegate.height = 180 * scaleRatio;
|
|
|
|
}
|
2016-11-06 19:28:12 +01:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
// borders
|
|
|
|
Rectangle{
|
2014-07-16 18:04:34 +02:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.top: parent.top
|
2017-12-27 00:53:21 +01:00
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
width: 1
|
|
|
|
color: "#404040"
|
2014-07-16 18:04:34 +02:00
|
|
|
}
|
2014-07-17 13:01:12 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Rectangle{
|
2016-10-11 00:28:06 +02:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.top: parent.top
|
2017-12-27 00:53:21 +01:00
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
width: collapsed ? 2 : 1
|
|
|
|
color: collapsed ? "#BBBBBB" : "#404040"
|
|
|
|
}
|
2014-07-17 13:01:12 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Rectangle{
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: parent.top
|
|
|
|
anchors.left: parent.left
|
|
|
|
height: 1
|
|
|
|
color: "#404040"
|
|
|
|
}
|
2016-11-05 12:19:47 +01:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Rectangle{
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.left: parent.left
|
|
|
|
height: 1
|
|
|
|
color: "#404040"
|
2016-11-05 12:19:47 +01:00
|
|
|
}
|
2017-12-27 00:53:21 +01:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: row1
|
2016-11-05 12:19:47 +01:00
|
|
|
anchors.left: parent.left
|
2017-12-27 00:53:21 +01:00
|
|
|
anchors.leftMargin: 20 * scaleRatio
|
2016-11-05 12:19:47 +01:00
|
|
|
anchors.right: parent.right
|
2017-12-27 00:53:21 +01:00
|
|
|
anchors.rightMargin: 20 * scaleRatio
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 15 * scaleRatio
|
|
|
|
height: 40 * scaleRatio
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: arrowImage
|
|
|
|
source: isOut ? "../images/downArrow.png" : "../images/upArrow-green.png"
|
|
|
|
height: 18 * scaleRatio
|
|
|
|
width: 12 * scaleRatio
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 12 * scaleRatio
|
2016-10-11 00:28:06 +02:00
|
|
|
}
|
2017-01-12 19:57:30 +01:00
|
|
|
|
2017-07-04 05:34:09 +02:00
|
|
|
Text {
|
2017-12-27 00:53:21 +01:00
|
|
|
id: txrxLabel
|
|
|
|
anchors.left: arrowImage.right
|
|
|
|
anchors.leftMargin: 18 * scaleRatio
|
2018-03-31 03:25:20 +02:00
|
|
|
font.family: MoneroComponents.Style.fontLight.name
|
2017-12-27 00:53:21 +01:00
|
|
|
font.pixelSize: 14 * scaleRatio
|
|
|
|
text: isOut ? "Sent" : "Received"
|
|
|
|
color: "#808080"
|
2017-07-04 05:34:09 +02:00
|
|
|
}
|
2017-12-27 00:53:21 +01:00
|
|
|
|
2017-07-04 05:34:09 +02:00
|
|
|
Text {
|
2017-12-27 00:53:21 +01:00
|
|
|
id: amountLabel
|
|
|
|
anchors.left: arrowImage.right
|
|
|
|
anchors.leftMargin: 18 * scaleRatio
|
|
|
|
anchors.top: txrxLabel.bottom
|
|
|
|
anchors.topMargin: 0 * scaleRatio
|
2018-03-31 03:25:20 +02:00
|
|
|
font.family: MoneroComponents.Style.fontBold.name
|
2017-12-27 00:53:21 +01:00
|
|
|
font.pixelSize: 18 * scaleRatio
|
2017-07-04 05:34:09 +02:00
|
|
|
font.bold: true
|
2018-01-28 00:14:42 +01:00
|
|
|
text: {
|
2018-03-29 21:30:09 +02:00
|
|
|
var _amount = amount;
|
|
|
|
if(_amount === 0){
|
|
|
|
// *sometimes* amount is 0, while the 'destinations string'
|
|
|
|
// has the correct amount, so we try to fetch it from that instead.
|
|
|
|
_amount = TxUtils.destinationsToAmount(destinations);
|
|
|
|
_amount = (_amount *1);
|
2018-01-28 00:14:42 +01:00
|
|
|
}
|
|
|
|
|
2018-03-29 21:30:09 +02:00
|
|
|
return _amount + " XMR";
|
2018-01-28 00:14:42 +01:00
|
|
|
}
|
2017-12-27 00:53:21 +01:00
|
|
|
color: isOut ? "white" : "#2eb358"
|
2017-07-04 05:34:09 +02:00
|
|
|
}
|
2016-10-11 00:28:06 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Rectangle {
|
|
|
|
anchors.right: parent.right
|
|
|
|
width: 300 * scaleRatio
|
|
|
|
height: parent.height
|
|
|
|
color: "transparent"
|
2014-07-16 18:04:34 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Text {
|
|
|
|
id: dateLabel
|
|
|
|
anchors.left: parent.left
|
2018-03-31 03:25:20 +02:00
|
|
|
font.family: MoneroComponents.Style.fontRegular.name
|
2017-12-27 00:53:21 +01:00
|
|
|
font.pixelSize: 14 * scaleRatio
|
|
|
|
text: date
|
|
|
|
color: "#808080"
|
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Text {
|
|
|
|
id: timeLabel
|
|
|
|
anchors.left: dateLabel.right
|
|
|
|
anchors.leftMargin: 7 * scaleRatio
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 3 * scaleRatio
|
|
|
|
font.pixelSize: 12 * scaleRatio
|
|
|
|
text: time
|
|
|
|
color: "#808080"
|
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
|
|
|
|
Text {
|
2017-12-27 00:53:21 +01:00
|
|
|
id: toLabel
|
|
|
|
property string address: ""
|
|
|
|
color: "#BBBBBB"
|
2014-07-16 18:04:34 +02:00
|
|
|
anchors.left: parent.left
|
2017-12-27 00:53:21 +01:00
|
|
|
anchors.top: dateLabel.bottom
|
|
|
|
anchors.topMargin: 0
|
2018-03-31 03:25:20 +02:00
|
|
|
font.family: MoneroComponents.Style.fontRegular.name
|
2017-12-27 00:53:21 +01:00
|
|
|
font.pixelSize: 16 * scaleRatio
|
|
|
|
text: {
|
|
|
|
if(isOut){
|
2018-03-21 01:35:34 +01:00
|
|
|
address = TxUtils.destinationsToAddress(destinations);
|
|
|
|
if(address){
|
|
|
|
var truncated = TxUtils.addressTruncate(address);
|
|
|
|
return "To " + truncated;
|
2017-12-27 00:53:21 +01:00
|
|
|
} else {
|
|
|
|
return "Unknown recipient";
|
|
|
|
}
|
|
|
|
}
|
2018-03-21 01:35:34 +01:00
|
|
|
return "";
|
2017-12-27 00:53:21 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
MouseArea{
|
|
|
|
visible: parent.address !== undefined
|
|
|
|
hoverEnabled: true
|
|
|
|
anchors.fill: parent
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onEntered: {
|
|
|
|
toLabel.color = "white";
|
|
|
|
}
|
|
|
|
onExited: {
|
|
|
|
toLabel.color = "#BBBBBB";
|
|
|
|
}
|
|
|
|
onClicked: {
|
|
|
|
if(parent.address){
|
2018-03-27 20:47:15 +02:00
|
|
|
console.log("Address copied to clipboard");
|
2017-12-27 00:53:21 +01:00
|
|
|
clipboard.setText(parent.address);
|
|
|
|
appWindow.showStatusMessage(qsTr("Address copied to clipboard"),3)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
}
|
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Rectangle {
|
|
|
|
height: 24 * scaleRatio
|
|
|
|
width: 24 * scaleRatio
|
|
|
|
color: "transparent"
|
2014-07-16 18:04:34 +02:00
|
|
|
anchors.right: parent.right
|
2017-12-27 00:53:21 +01:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: dropdownImage
|
|
|
|
height: 8 * scaleRatio
|
|
|
|
width: 12 * scaleRatio
|
|
|
|
source: "../images/whiteDropIndicator.png"
|
|
|
|
rotation: delegate.collapsed ? 180 : 0
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
2014-07-16 18:04:34 +02:00
|
|
|
}
|
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
MouseArea{
|
|
|
|
anchors.fill: parent
|
|
|
|
hoverEnabled: true
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: {
|
|
|
|
delegate.collapsed = !delegate.collapsed;
|
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2017-12-27 00:53:21 +01:00
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Rectangle {
|
|
|
|
id: row2
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 20 * scaleRatio
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 20 * scaleRatio
|
|
|
|
anchors.top: row1.bottom
|
|
|
|
anchors.topMargin: 15 * scaleRatio
|
|
|
|
height: 40 * scaleRatio
|
|
|
|
color: "transparent"
|
|
|
|
visible: delegate.collapsed
|
|
|
|
|
|
|
|
// left column
|
2018-03-31 03:25:20 +02:00
|
|
|
MoneroComponents.HistoryTableInnerColumn{
|
2017-12-27 00:53:21 +01:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 30 * scaleRatio
|
|
|
|
|
|
|
|
labelHeader: "Transaction ID"
|
|
|
|
labelValue: hash.substring(0, 18) + "..."
|
|
|
|
copyValue: hash
|
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
// right column
|
2018-03-31 03:25:20 +02:00
|
|
|
MoneroComponents.HistoryTableInnerColumn{
|
2017-12-27 00:53:21 +01:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 100 * scaleRatio
|
|
|
|
width: 200 * scaleRatio
|
|
|
|
height: parent.height
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
labelHeader: qsTr("Fee")
|
|
|
|
labelValue: {
|
|
|
|
if(!isOut && !fee){
|
|
|
|
return "-";
|
|
|
|
} else if(isOut && fee){
|
|
|
|
return fee + " XMR";
|
|
|
|
} else {
|
|
|
|
return "Unknown"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
copyValue: {
|
|
|
|
if(isOut && fee){ return fee }
|
|
|
|
else { return "" }
|
2014-07-16 18:04:34 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Rectangle {
|
|
|
|
id: row3
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 20 * scaleRatio
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 20 * scaleRatio
|
|
|
|
anchors.top: row2.bottom
|
|
|
|
anchors.topMargin: 15 * scaleRatio
|
|
|
|
height: 40 * scaleRatio
|
|
|
|
color: "transparent"
|
|
|
|
visible: delegate.collapsed
|
|
|
|
|
|
|
|
// left column
|
2018-03-31 03:25:20 +02:00
|
|
|
MoneroComponents.HistoryTableInnerColumn{
|
2017-12-27 00:53:21 +01:00
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.leftMargin: 30 * scaleRatio
|
2018-03-27 02:03:59 +02:00
|
|
|
labelHeader: qsTr("Blockheight")
|
|
|
|
labelValue: {
|
|
|
|
if (!isPending)
|
|
|
|
if(confirmations < confirmationsRequired)
|
|
|
|
return blockHeight + " " + qsTr("(%1/%2 confirmations)").arg(confirmations).arg(confirmationsRequired);
|
|
|
|
else
|
|
|
|
return blockHeight;
|
|
|
|
if (!isOut)
|
|
|
|
return qsTr("UNCONFIRMED") + translationManager.emptyString
|
|
|
|
if (isFailed)
|
|
|
|
return qsTr("FAILED") + translationManager.emptyString
|
|
|
|
return qsTr("PENDING") + translationManager.emptyString
|
2014-07-16 18:04:34 +02:00
|
|
|
}
|
2018-03-27 02:03:59 +02:00
|
|
|
copyValue: labelValue
|
2017-12-27 00:53:21 +01:00
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
// right column
|
2018-03-31 03:25:20 +02:00
|
|
|
MoneroComponents.HistoryTableInnerColumn {
|
2017-12-27 00:53:21 +01:00
|
|
|
visible: currentWallet.getUserNote(hash)
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 80 * scaleRatio
|
|
|
|
width: 220 * scaleRatio
|
|
|
|
height: parent.height
|
|
|
|
color: "transparent"
|
|
|
|
|
|
|
|
labelHeader: qsTr("Description")
|
|
|
|
labelValue: {
|
|
|
|
var note = currentWallet.getUserNote(hash);
|
|
|
|
if(note){
|
|
|
|
if(note.length > 28) {
|
|
|
|
return note.substring(0, 28) + "...";
|
|
|
|
} else {
|
|
|
|
return note;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
return "";
|
2016-10-08 02:54:35 +02:00
|
|
|
}
|
|
|
|
}
|
2017-12-27 00:53:21 +01:00
|
|
|
copyValue: {
|
|
|
|
return currentWallet.getUserNote(hash);
|
|
|
|
}
|
2016-10-08 02:54:35 +02:00
|
|
|
}
|
|
|
|
|
2018-03-21 01:35:34 +01:00
|
|
|
Rectangle {
|
|
|
|
id: proofButton
|
|
|
|
visible: isOut
|
|
|
|
color: "#404040"
|
|
|
|
height: 24 * scaleRatio
|
|
|
|
width: 24 * scaleRatio
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: 36
|
|
|
|
radius: 20 * scaleRatio
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
id: proofButtonMouseArea
|
|
|
|
anchors.fill: parent
|
|
|
|
hoverEnabled: true
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: {
|
|
|
|
var address = TxUtils.destinationsToAddress(destinations);
|
|
|
|
if(address === undefined){
|
|
|
|
console.log('getProof: Error fetching address')
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2018-03-27 02:03:59 +02:00
|
|
|
var checked = (TxUtils.checkTxID(hash) && TxUtils.checkAddress(address, appWindow.persistentSettings.nettype));
|
2018-03-21 01:35:34 +01:00
|
|
|
if(!checked){
|
|
|
|
console.log('getProof: Error checking TxId and/or address');
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log("getProof: Generate clicked: txid " + hash + ", address " + address);
|
|
|
|
root.getProofClicked(hash, address, '');
|
|
|
|
}
|
|
|
|
|
|
|
|
onEntered: {
|
|
|
|
proofButton.color = "#656565";
|
|
|
|
}
|
|
|
|
|
|
|
|
onExited: {
|
|
|
|
proofButton.color = "#404040";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Text {
|
2018-03-31 03:25:20 +02:00
|
|
|
color: MoneroComponents.Style.defaultFontColor
|
2018-03-21 01:35:34 +01:00
|
|
|
text: "P"
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
font.pixelSize: 14 * scaleRatio
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Rectangle {
|
|
|
|
id: detailsButton
|
|
|
|
color: "#404040"
|
|
|
|
height: 24 * scaleRatio
|
|
|
|
width: 24 * scaleRatio
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: 6
|
|
|
|
radius: 20 * scaleRatio
|
2016-10-08 02:54:35 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
MouseArea {
|
|
|
|
id: detailsButtonMouseArea
|
|
|
|
anchors.fill: parent
|
|
|
|
hoverEnabled: true
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
onClicked: {
|
|
|
|
var tx_key = currentWallet.getTxKey(hash)
|
|
|
|
var tx_note = currentWallet.getUserNote(hash)
|
|
|
|
var rings = currentWallet.getRings(hash)
|
|
|
|
if (rings)
|
|
|
|
rings = rings.replace(/\|/g, '\n')
|
|
|
|
informationPopup.title = "Transaction details";
|
|
|
|
informationPopup.content = buildTxDetailsString(hash,paymentId,tx_key,tx_note,destinations, rings);
|
|
|
|
informationPopup.onCloseCallback = null
|
|
|
|
informationPopup.open();
|
2014-07-16 18:04:34 +02:00
|
|
|
}
|
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
onEntered: {
|
|
|
|
detailsButton.color = "#656565";
|
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
onExited: {
|
|
|
|
detailsButton.color = "#404040";
|
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
}
|
|
|
|
|
2017-12-27 00:53:21 +01:00
|
|
|
Text {
|
2018-03-31 03:25:20 +02:00
|
|
|
color: MoneroComponents.Style.defaultFontColor
|
2017-12-27 00:53:21 +01:00
|
|
|
text: "?"
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
font.pixelSize: 14 * scaleRatio
|
|
|
|
}
|
|
|
|
}
|
2014-07-16 18:04:34 +02:00
|
|
|
}
|
2016-10-04 22:12:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
Clipboard { id: clipboard }
|
2014-07-16 18:04:34 +02:00
|
|
|
}
|