mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-26 00:33:17 +00:00
Add a "Create Pool" flow to the AMM app that lets a user open a new liquidity position — seeding a pool's initial liquidity — from token selection and amount entry, through a confirmation dialog, to on-chain submission. - client crate (apps/amm/client): pure, testable protocol logic — account decoding, pair/position modelling, and quote/plan computation — exposed to the app over a C ABI (config/networks.json drives network selection). - C++ runtime + backend: AmmClient, ActiveNetwork, and NewPositionRuntime, wired into AmmUiBackend (new resolve/quote/submit slots). - QML flow: NewPositionForm, NewPositionFlow state, NewPositionConfirmation- Dialog, TokenSelectorModal, and reusable Amm* presentational components (theme, surfaces, buttons) + AmountMath.js. - tests: C++ (NewPositionRuntimeTest, ActiveNetworkTest) and QML (tst_NewPositionForm, tst_LiquidityPage, tst_TokenAmountInput, …).
51 lines
1.5 KiB
QML
51 lines
1.5 KiB
QML
import QtQml
|
|
|
|
QtObject {
|
|
property bool isDark: true
|
|
readonly property var colors: isDark ? dark : light
|
|
|
|
readonly property var light: ({
|
|
"background": "#F4EDE3",
|
|
"cardBg": "#FFFFFF",
|
|
"inputBg": "#EFE7DB",
|
|
"panelBg": "#E7E1D8",
|
|
"panelHoverBg": "#D9D0C2",
|
|
"textPrimary": "#151515",
|
|
"textSecondary": "#7D756E",
|
|
"textPlaceholder": "#A9A098",
|
|
"border": Qt.rgba(0, 0, 0, 0.08),
|
|
"borderStrong": Qt.rgba(0, 0, 0, 0.10),
|
|
"divider": Qt.rgba(0, 0, 0, 0.06),
|
|
"ctaBg": "#F26A21",
|
|
"ctaHoverBg": "#D95C1E",
|
|
"ctaPressedBg": "#C85018",
|
|
"selection": "#F2D8C7",
|
|
"noTokenCircle": "#A9A098",
|
|
"success": "#4F9B64",
|
|
"warning": "#B8732A",
|
|
"error": "#D85F4B"
|
|
})
|
|
|
|
readonly property var dark: ({
|
|
"background": "#151515",
|
|
"cardBg": "#1B1B1B",
|
|
"inputBg": "#101010",
|
|
"panelBg": "#181818",
|
|
"panelHoverBg": "#202020",
|
|
"textPrimary": "#E7E1D8",
|
|
"textSecondary": "#A9A098",
|
|
"textPlaceholder": "#8E8780",
|
|
"border": Qt.rgba(1, 1, 1, 0.08),
|
|
"borderStrong": Qt.rgba(1, 1, 1, 0.10),
|
|
"divider": Qt.rgba(1, 1, 1, 0.06),
|
|
"ctaBg": "#F26A21",
|
|
"ctaHoverBg": "#FF8A3D",
|
|
"ctaPressedBg": "#D95C1E",
|
|
"selection": "#211914",
|
|
"noTokenCircle": "#343434",
|
|
"success": "#78C88D",
|
|
"warning": "#F2B366",
|
|
"error": "#F08A76"
|
|
})
|
|
}
|