From bf312bbf276c4db206257af7b0f7cca18ec7ec58 Mon Sep 17 00:00:00 2001 From: r4bbit <445106+0x-r4bbit@users.noreply.github.com> Date: Tue, 11 Aug 2026 09:30:30 +0200 Subject: [PATCH] refactor(apps/amm): drop dead liquidity-form leftovers from the quote migration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cleanup surfaced while auditing the lean-quote migration: - Remove the `quote_changed` / `quote_not_submittable` error messages — relics of the dropped quoteHash/canSubmit commitment model, emitted by nothing now. - Remove the `network_unknown` / `network_mismatch` messages — the `Network` model is gone, so they're never emitted. - warningText: drop the dead `quotePayload.warnings` branch (lean quotes carry no warnings); keep the live token-sourcing-context warnings. --- apps/amm/qml/components/liquidity/NewPositionForm.qml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/apps/amm/qml/components/liquidity/NewPositionForm.qml b/apps/amm/qml/components/liquidity/NewPositionForm.qml index 1b05d52..4e21f3d 100644 --- a/apps/amm/qml/components/liquidity/NewPositionForm.qml +++ b/apps/amm/qml/components/liquidity/NewPositionForm.qml @@ -1198,8 +1198,6 @@ AmmActionCard { "wallet_unavailable": qsTr("Wallet is unavailable."), "wallet_submission_failed": qsTr("Wallet submission failed. Review and retry manually."), "signature_rejected": qsTr("Wallet approval was rejected."), - "quote_changed": qsTr("Pool or wallet state changed. Review the refreshed quote."), - "quote_not_submittable": qsTr("Current quote cannot be submitted."), "submit_in_progress": qsTr("A submission is already in progress."), "transaction_deadline_expired": qsTr("Wallet approval expired. Retry to create a fresh request."), "high_slippage": qsTr("High slippage tolerance."), @@ -1207,8 +1205,6 @@ AmmActionCard { "token_program_mismatch": qsTr("Token belongs to a different TokenProgram."), "token_not_fungible": qsTr("Token is not a public fungible token."), "backend_error": qsTr("Position backend failed. Refresh and retry."), - "network_unknown": qsTr("Network identity could not be verified. Refresh and retry."), - "network_mismatch": qsTr("Connected wallet uses a different network."), "config_missing": qsTr("Network configuration is missing."), "account_read_failed": qsTr("Required on-chain state could not be read."), "pool_unavailable": qsTr("Pool state is unavailable."), @@ -1429,10 +1425,8 @@ AmmActionCard { } function warningText() { - var warnings = !root.quoteStale && root.quoteMatchesPair() - ? root.quotePayload.warnings || [] : [] - if (warnings.length === 0) - warnings = root.newPositionContext.warnings || [] + // The lean quotes carry no warnings; only the token-sourcing context may. + var warnings = root.newPositionContext.warnings || [] return warnings.length > 0 ? root.issueText(warnings[0].code) : "" }