2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
2020-06-17 16:02:33 +00:00
|
|
|
import "../../../../imports"
|
|
|
|
import "../../../../shared"
|
|
|
|
import "./"
|
|
|
|
|
|
|
|
ModalPopup {
|
|
|
|
id: popup
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Transaction Details"
|
|
|
|
title: qsTrId("transaction-details")
|
2020-06-17 16:02:33 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
id: confirmations
|
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.top: parent.top
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.right: parent.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.rightMargin: Style.current.smallPadding
|
|
|
|
height: children[0].height + children[1].height + Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: confirmationsCount
|
2020-08-27 18:02:28 +00:00
|
|
|
// TODO get the right value
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "9999 Confirmations"
|
|
|
|
text: qsTrId("9999-confirmations")
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
}
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: confirmationsInfo
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "When the transaction has 12 confirmations you can consider it settled."
|
|
|
|
text: qsTrId("confirmations-helper-text")
|
2020-08-27 18:02:28 +00:00
|
|
|
wrapMode: Text.WordWrap
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.top: confirmationsCount.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.smallPadding
|
2020-08-27 18:02:28 +00:00
|
|
|
width:parent.width
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Separator {
|
|
|
|
id: separator
|
|
|
|
anchors.top: confirmations.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: -Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.right: parent.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.rightMargin: -Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: block
|
|
|
|
anchors.top: separator.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
height: children[0].height
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: labelBlock
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Block"
|
|
|
|
text: qsTrId("block")
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: valueBlock
|
2020-09-28 06:58:55 +00:00
|
|
|
text: utilsModel.hex2Dec(blockNumber)
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
anchors.left: labelBlock.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: hash
|
|
|
|
anchors.top: block.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2020-08-27 18:02:28 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
height: children[0].height
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: labelHash
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Hash"
|
|
|
|
text: qsTrId("hash")
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 18:02:28 +00:00
|
|
|
Address {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: valueHash
|
|
|
|
text: blockHash
|
|
|
|
width: 160
|
2020-08-27 18:02:28 +00:00
|
|
|
maxWidth: parent.width - labelHash.width - Style.current.padding
|
|
|
|
color: Style.current.textColor
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
anchors.left: labelHash.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: from
|
|
|
|
anchors.top: hash.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
height: children[0].height
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: labelFrom
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "From"
|
|
|
|
text: qsTrId("from")
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 18:02:28 +00:00
|
|
|
Address {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: valueFrom
|
|
|
|
text: fromAddress
|
2020-08-27 18:02:28 +00:00
|
|
|
color: Style.current.textColor
|
2020-06-17 16:02:33 +00:00
|
|
|
width: 160
|
|
|
|
font.pixelSize: 14
|
|
|
|
anchors.left: labelFrom.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: toItem
|
|
|
|
anchors.top: from.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
height: children[0].height
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: labelTo
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "To"
|
|
|
|
text: qsTrId("to")
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
|
2020-08-27 18:02:28 +00:00
|
|
|
Address {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: valueTo
|
|
|
|
text: to
|
2020-08-27 18:02:28 +00:00
|
|
|
color: Style.current.textColor
|
2020-06-17 16:02:33 +00:00
|
|
|
width: 160
|
|
|
|
font.pixelSize: 14
|
|
|
|
anchors.left: labelTo.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: gasLimitItem
|
|
|
|
anchors.top: toItem.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
height: children[0].height
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: labelGasLimit
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Gas limit"
|
|
|
|
text: qsTrId("gas-limit")
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: valueGasLimit
|
2020-09-28 06:58:55 +00:00
|
|
|
text: utilsModel.hex2Dec(gasLimit)
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
anchors.left: labelGasLimit.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: gasPriceItem
|
|
|
|
anchors.top: gasLimitItem.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
height: children[0].height
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: labelGasPrice
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Gas price"
|
|
|
|
text: qsTrId("gas-price")
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: valueGasPrice
|
2020-09-28 06:58:55 +00:00
|
|
|
text: utilsModel.hex2Eth(gasPrice)
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
anchors.left: labelGasPrice.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: gasUsedItem
|
|
|
|
anchors.top: gasPriceItem.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
height: children[0].height
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: labelGasUsed
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Gas used"
|
|
|
|
text: qsTrId("gas-used")
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: valueGasUsed
|
2020-09-28 06:58:55 +00:00
|
|
|
text: utilsModel.hex2Dec(gasUsed)
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
anchors.left: labelGasUsed.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
id: nonceItem
|
|
|
|
anchors.top: gasUsedItem.bottom
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
anchors.left: parent.left
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.smallPadding
|
2020-06-17 16:02:33 +00:00
|
|
|
height: children[0].height
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: labelNonce
|
2020-07-06 20:39:55 +00:00
|
|
|
//% "Nonce"
|
|
|
|
text: qsTrId("nonce")
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
font.weight: Font.Medium
|
2020-07-02 15:14:31 +00:00
|
|
|
color: Style.current.darkGrey
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
|
2020-06-19 18:06:58 +00:00
|
|
|
StyledText {
|
2020-06-17 16:02:33 +00:00
|
|
|
id: valueNonce
|
2020-09-28 06:58:55 +00:00
|
|
|
text: utilsModel.hex2Dec(nonce)
|
2020-06-17 16:02:33 +00:00
|
|
|
font.pixelSize: 14
|
|
|
|
anchors.left: labelNonce.right
|
2020-07-02 15:14:31 +00:00
|
|
|
anchors.leftMargin: Style.current.padding
|
2020-06-17 16:02:33 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|