fix: display transaction data

This commit is contained in:
Richard Ramos 2020-12-09 11:58:42 -04:00 committed by Iuri Matias
parent e37cba7edd
commit 4d2e396b7f
2 changed files with 70 additions and 0 deletions

View File

@ -182,6 +182,7 @@ ModalPopup {
amount: { "value": root.selectedAmount, "fiatValue": root.selectedFiatAmount }
currency: walletModel.defaultCurrency
isFromEditable: false
trxData: root.trxData
isGasEditable: true
fromValid: balanceValidator.isValid
gasValid: gasValidator.isValid

View File

@ -11,6 +11,7 @@ Item {
property var toAccount
property var asset
property var amount
property string trxData: "0x"
property string currency: "USD"
property var gas
height: content.height
@ -460,5 +461,73 @@ Item {
}
}
}
LabelValueRow {
id: itmData
label: qsTr("Data")
visible: trxData !== "0x" && trxData !== ""
value: Item {
id: dataRoot
anchors.fill: parent
anchors.verticalCenter: parent.verticalCenter
Row {
spacing: Style.current.halfPadding
rightPadding: 0
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
StyledText {
font.pixelSize: 15
height: 22
width: 200
text: trxData
elide: Text.ElideRight
color: Style.current.secondaryText
anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
}
SVGImage {
width: 13
visible: true
anchors.verticalCenter: parent.verticalCenter
fillMode: Image.PreserveAspectFit
source: "../app/img/caret.svg"
rotation: 270
ColorOverlay {
anchors.fill: parent
visible: parent.visible
source: parent
color: Style.current.secondaryText
}
}
}
ModalPopup {
id: dataPopup
title: qsTr("Data field")
height: 286
width: 400
Item {
anchors.fill: parent
anchors.leftMargin: 0
anchors.rightMargin: 0
ScrollView {
width: parent.width
height: 150
TextArea {
wrapMode: TextEdit.Wrap
readOnly: true
text: trxData
}
}
}
}
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
onClicked: dataPopup.open()
}
}
}
}
}