2023-05-16 08:25:40 +00:00
|
|
|
import QtQuick 2.14
|
|
|
|
import QtQuick.Controls 2.14
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import AppLayouts.Wallet.controls 1.0
|
|
|
|
import AppLayouts.Wallet.panels 1.0
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
import Storybook 1.0
|
|
|
|
|
|
|
|
import Models 1.0
|
|
|
|
|
|
|
|
SplitView {
|
|
|
|
id: root
|
|
|
|
|
|
|
|
Logs { id: logs }
|
|
|
|
|
|
|
|
orientation: Qt.Vertical
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: d
|
|
|
|
|
|
|
|
property var dummyTx: ({
|
|
|
|
id: 0xb501e3042105c382a498819b07aba58de3422984e1150655c1583bd1aae144ef,
|
|
|
|
txType: "erc20",
|
|
|
|
address: 0x9d41ac74e7d1f981e98f4ec0d631cde0857a2b9c,
|
|
|
|
blockNumber: 0x7b7935,
|
|
|
|
blockHash: 0,
|
|
|
|
timestamp: 1670419848,
|
|
|
|
nonce: 0x36,
|
|
|
|
txStatus: 0x1,
|
|
|
|
chainId: 5,
|
|
|
|
txHash: 0x82de33a9e81f7c06ea03ad742bc666c4eacb7ec771bac4544ef70a12b2c46d04,
|
|
|
|
symbol: "ETH",
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
Item {
|
|
|
|
SplitView.fillWidth: true
|
|
|
|
SplitView.fillHeight: true
|
|
|
|
|
|
|
|
Column {
|
|
|
|
anchors.centerIn: parent
|
|
|
|
spacing: 100
|
|
|
|
StatusTxProgressBar {
|
2023-10-05 15:37:47 +00:00
|
|
|
id: progressBar
|
2023-05-16 08:25:40 +00:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
width: 500
|
|
|
|
error: failureCheckBox.checked
|
2023-10-05 15:37:47 +00:00
|
|
|
networkLayer: mainnetCheckbox.checked ? 1 : 2
|
2023-05-16 08:25:40 +00:00
|
|
|
confirmations: confirmationsSlider.value
|
|
|
|
duration: durationSlider.to
|
|
|
|
progress: durationSlider.value
|
2023-10-05 15:37:47 +00:00
|
|
|
chainName: isLayer1 ? "Mainnet" : "Optimism"
|
2023-05-16 08:25:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
width: root.width
|
2023-10-05 15:37:47 +00:00
|
|
|
height: 200
|
2023-05-16 08:25:40 +00:00
|
|
|
border.width: 2
|
|
|
|
WalletTxProgressBlock {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 20
|
|
|
|
width: 500
|
|
|
|
error: failureCheckBox.checked
|
2023-10-05 15:37:47 +00:00
|
|
|
inNetworkConfirmations: confirmationsSlider.value
|
|
|
|
outNetworkConfirmations: confirmationsSlider.value
|
|
|
|
inChainName: progressBar.isLayer1 ? "Mainnet" : "Optimism"
|
|
|
|
outChainName: inChainName
|
|
|
|
inNetworkTimestamp: 1670419847
|
|
|
|
outNetworkTimestamp: 1670419848
|
2023-05-16 08:25:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
LogsAndControlsPanel {
|
|
|
|
id: logsAndControlsPanel
|
|
|
|
|
|
|
|
SplitView.minimumHeight: 100
|
2023-10-05 15:37:47 +00:00
|
|
|
SplitView.preferredHeight: 250
|
2023-05-16 08:25:40 +00:00
|
|
|
|
|
|
|
logsView.logText: logs.logText
|
|
|
|
Column {
|
|
|
|
CheckBox {
|
|
|
|
id: mainnetCheckbox
|
|
|
|
text: "Mainnet"
|
|
|
|
checked: true
|
|
|
|
}
|
|
|
|
CheckBox {
|
|
|
|
id: failureCheckBox
|
|
|
|
text: "Failed"
|
|
|
|
}
|
|
|
|
Slider {
|
|
|
|
id: confirmationsSlider
|
|
|
|
width: 600
|
|
|
|
value: 0
|
|
|
|
from: 0
|
|
|
|
to: 1000
|
|
|
|
stepSize: 1
|
|
|
|
Text {
|
|
|
|
anchors.left: parent.right
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
text: "Confirmations = " + confirmationsSlider.value
|
|
|
|
}
|
|
|
|
}
|
2023-10-05 15:37:47 +00:00
|
|
|
TextField {
|
2023-05-16 08:25:40 +00:00
|
|
|
id: duration
|
2023-10-05 15:37:47 +00:00
|
|
|
placeholderText: "Duration for finalisation"
|
2023-05-16 08:25:40 +00:00
|
|
|
text: "7"
|
|
|
|
visible: !mainnetCheckbox.checked && !failureCheckBox.checked
|
|
|
|
}
|
|
|
|
Slider {
|
|
|
|
id: durationSlider
|
|
|
|
width: 600
|
|
|
|
value: 0
|
|
|
|
from: 0
|
|
|
|
to: Number(duration.text)*24
|
|
|
|
stepSize: 1
|
|
|
|
Text {
|
|
|
|
anchors.left: parent.right
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
text: "Finalisation = " + durationSlider.value
|
|
|
|
}
|
|
|
|
visible: !mainnetCheckbox.checked && !failureCheckBox.checked
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-07-31 12:21:14 +00:00
|
|
|
|
|
|
|
// category: Wallet
|