Skip to content

fix(perps): return the replacement order ID from HyperLiquid editOrder #9732

Description

@abretonc7s

Problem

HyperLiquidProvider.editOrder calls HyperLiquid modify, then returns the submitted target ID as OrderResult.orderId. HyperLiquid replaces the resting order under a new OID, so the returned ID names the cancelled order. OrderResult.orderId is documented as the exchange order ID.

Reproduction

During the PR #9674 testnet proof, editing resting order 57188811453 succeeded, the target disappeared, and the replacement rested as 57188821994. The SDK modify success response does not include the replacement OID.

The affected path is packages/perps-controller/src/providers/HyperLiquidProvider.ts in editOrder.

Expected

Return the replacement exchange OID only when it can be resolved authoritatively and unambiguously. Otherwise omit the optional orderId; do not return the stale target ID.

Current Extension and Mobile clients do not appear to call editOrder, so this is not client-blocking, but the provider result contract is incorrect for direct consumers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions