Skip to content

fix(perps): reconcile remaining Cross margin Lite and Reverse behavior #36919

Description

@abretonc7s

Purpose

Preserve the unfinished work from #36782 while retiring its overlapping Pro implementation. This is follow-up work, not a claim that the behavior has shipped or passed final review.

The single current Pro implementation is #36881, including the controller backport and venue-lock UI. The former split PRs #36897 and #36918 are consolidated there. Do not merge #36782 alongside it.

Remaining scope

  • Reconcile Lite trading on an existing Cross position. The old changes in PerpsMarketDetailsView and PerpsOrderView remove the unsupported warning and pass the position's mode. Reuse the current order-parameter contract instead of restoring the old Pro implementation.
  • Reconcile Cross-position Reverse/Flip behavior. The old changes disable Reverse in PerpsProPositionCard and hide Flip in PerpsModifyActionSheet because the venue rejects switching leverage type with an open position. Verify the current controller contract before reusing these guards.
  • Cover the provider and market restrictions through the supported capability contract from feat(perps): expose margin-mode lock and supported margin modes per market core#10414. Do not send an unsupported explicit mode to Lighter, HIP-3 or isolated-only markets. Recheck which parts are present in the installed controller release; feat(perps): enable Pro Cross-margin orders with venue locking #36881 contains the margin-lock backport, not the whole Core PR.
  • Reconcile the old review fixes for Cross liquidation displays and nested Lite leverage settings against the surviving implementation. Preserve any missing fix without bringing back duplicate Pro form state.
  • Require focused regression tests, real device evidence and final review on the reconciled changes. Keep the production Cross flag off until all required trading-safety work is validated.

Preserved source

  • Original PR: feat(perps): place Cross margin orders behind perpsCrossMarginEnabled #36782, published head 9d5f587975301b942376f9932177a197c832c8a4.
  • Retain branch TAT-3985-perps-cross-margin-orders; closing the PR must not delete it.
  • Additional unpublished work and review notes are preserved separately. The original PR description records unresolved provider-contract concerns; do not treat those local changes as approved.

MetaMask/core#10464 separately persists the Pro selection. It is not the venue lock and does not replace this follow-up.

Refs: https://consensyssoftware.atlassian.net/browse/TAT-3524

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

INVALID-ISSUE-TEMPLATEIssue's body doesn't match any issue template.ta-bot-triageTriage-Agent - Re-triage prevention lock - applied immediately on pipeline startteam-perpsPerps team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions