mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-18 04:49:30 +00:00
Implement one create-pool and add-liquidity workflow. Add searchable token resolution, direct opening-price and deposit editing, optimistic pool activation, and base58 transaction IDs. Isolate network, wallet, AMM client, and runtime boundaries. Stabilize quote, submission, refresh, and pool-probe state while consolidating liquidity tests and removing obsolete liquidity paths.
52 lines
1.1 KiB
QML
52 lines
1.1 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
ColumnLayout {
|
|
id: root
|
|
|
|
property var snapshot: ({})
|
|
|
|
spacing: 8
|
|
|
|
function actionText(instruction) {
|
|
if (instruction === "NewDefinition")
|
|
return qsTr("Create pool")
|
|
if (instruction === "AddLiquidity")
|
|
return qsTr("Add liquidity")
|
|
return instruction || "-"
|
|
}
|
|
|
|
SummaryRow {
|
|
Layout.fillWidth: true
|
|
label: qsTr("Pair")
|
|
value: root.snapshot.pairText || "-"
|
|
}
|
|
|
|
SummaryRow {
|
|
Layout.fillWidth: true
|
|
label: qsTr("Action")
|
|
value: root.actionText(root.snapshot.instruction)
|
|
}
|
|
|
|
SummaryRow {
|
|
Layout.fillWidth: true
|
|
label: qsTr("Fee")
|
|
value: root.snapshot.feeText || "-"
|
|
}
|
|
|
|
SummaryRow {
|
|
Layout.fillWidth: true
|
|
label: qsTr("Deposit")
|
|
value: qsTr("%1 + %2")
|
|
.arg(root.snapshot.depositAText || "-")
|
|
.arg(root.snapshot.depositBText || "-")
|
|
valueWrapAnywhere: true
|
|
}
|
|
|
|
SummaryRow {
|
|
Layout.fillWidth: true
|
|
label: qsTr("Expected LP")
|
|
value: root.snapshot.expectedLpText || "-"
|
|
}
|
|
}
|