mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-08-25 22:21:16 +00:00
Now that add-liquidity and pool creation submit via addLiquidity / createPool, the legacy submitNewPosition path is dead. Remove it end to end. App backend (AmmUiBackend): - Drop the submitNewPosition slot/method and its newPositionError helper. Module (AmmModuleImpl): - Drop submitNewPosition, the m_requestPending guard, and the now-orphaned nowMs/parseU64 helpers (+ the <chrono> include). FFI (amm_ffi) — the plan op only submitNewPosition called: - Delete plan.rs; remove amm_plan (extern + regenerated header), api::plan, and PlanRequest. - Remove the plan-only machinery it fed: QuoteBranch, NewPositionPlan, EvaluatedQuote.plan/quote_hash, and AccountPlan's wallet_args / requires_fresh_lp / contains / validate_ready, plus the plan construction in quote.rs. - Tests: drop the plan-only tests/helpers; keep quote coverage by trimming the mixed tests to their quote assertions. QML tests (tst_LiquidityPage): - Remove the two legacy-submit tests (base58-only success) + the submitNewPosition mock and its now-unused fixtures. Keep the finishSubmitFailure test (unchanged behaviour). quoteNewPosition and its machinery (amm_quote, buildQuoteInput, PairSnapshot, AccountPlan preview/sources, commitment) stay — they retire with the legacy quoting in the quote-migration vertical.