mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-17 20:39:28 +00:00
Replace AMM-local wallet access, account state, controls, and confirmation-dialog mechanics with the reusable wallet targets. Keep AMM-specific transaction summaries and actions in the AMM UI.\n\nRefs #227
89 lines
2.4 KiB
QML
89 lines
2.4 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
|
|
property var theme
|
|
property var snapshot: ({})
|
|
|
|
spacing: 10
|
|
|
|
Rectangle {
|
|
Layout.fillWidth: true
|
|
color: root.theme.colors.inputBg
|
|
radius: 8
|
|
implicitHeight: payColumn.implicitHeight + 24
|
|
|
|
ColumnLayout {
|
|
id: payColumn
|
|
anchors.fill: parent
|
|
anchors.margins: 12
|
|
spacing: 4
|
|
|
|
Text {
|
|
Layout.fillWidth: true
|
|
text: qsTr("You pay")
|
|
color: root.theme.colors.textSecondary
|
|
font.pixelSize: 12
|
|
}
|
|
|
|
Text {
|
|
Layout.fillWidth: true
|
|
text: qsTr("%1 %2")
|
|
.arg(root.snapshot.sellAmount || "")
|
|
.arg(root.snapshot.sellToken || "")
|
|
color: root.theme.colors.textPrimary
|
|
font.bold: true
|
|
font.pixelSize: 18
|
|
elide: Text.ElideRight
|
|
}
|
|
}
|
|
}
|
|
|
|
Rectangle {
|
|
Layout.fillWidth: true
|
|
color: root.theme.colors.inputBg
|
|
radius: 8
|
|
implicitHeight: receiveColumn.implicitHeight + 24
|
|
|
|
ColumnLayout {
|
|
id: receiveColumn
|
|
anchors.fill: parent
|
|
anchors.margins: 12
|
|
spacing: 4
|
|
|
|
Text {
|
|
Layout.fillWidth: true
|
|
text: qsTr("You receive at least")
|
|
color: root.theme.colors.textSecondary
|
|
font.pixelSize: 12
|
|
}
|
|
|
|
Text {
|
|
Layout.fillWidth: true
|
|
text: qsTr("%1 %2")
|
|
.arg(root.snapshot.minReceived || "")
|
|
.arg(root.snapshot.buyToken || "")
|
|
color: root.theme.colors.textPrimary
|
|
font.bold: true
|
|
font.pixelSize: 18
|
|
elide: Text.ElideRight
|
|
}
|
|
}
|
|
}
|
|
|
|
SwapSummary {
|
|
Layout.fillWidth: true
|
|
theme: root.theme
|
|
swapModeText: root.snapshot.swapModeText || ""
|
|
feeText: root.snapshot.feeAmount || ""
|
|
priceImpactText: root.snapshot.priceImpactPercent || ""
|
|
priceImpactPercent: Number(root.snapshot.priceImpactPercentValue) || 0
|
|
slippageText: root.snapshot.slippageTolerance || ""
|
|
minReceivedText: qsTr("%1 %2")
|
|
.arg(root.snapshot.minReceived || "")
|
|
.arg(root.snapshot.buyToken || "")
|
|
}
|
|
}
|