Skip to content

fix: pass perps deposit order ID to status request#12541

Open
Kahnchan wants to merge 2 commits into
OneKeyHQ:release/v6.5.0from
Kahnchan:fix/perps-deposit-order-id
Open

fix: pass perps deposit order ID to status request#12541
Kahnchan wants to merge 2 commits into
OneKeyHQ:release/v6.5.0from
Kahnchan:fix/perps-deposit-order-id

Conversation

@Kahnchan

Copy link
Copy Markdown
Contributor

Summary

  • Capture the orderId returned by /swap/v1/perp-deposit-quote.
  • Persist it with the Perps pending deposit order.
  • Pass it to /swap/v1/perp-deposit-order-status while keeping direct Arbitrum USDC and legacy pending orders compatible.

Intent & Context

The Perps deposit quote endpoint now returns an order ID for routed deposits such as LI.FI. The status endpoint needs the same ID to identify the corresponding order reliably.

Root Cause

The client only persisted the source transaction hash. The quote order ID was discarded, so subsequent status requests could not include the new backend identifier.

Design Decisions

The order ID is stored in the persisted pending-order atom rather than component state. This keeps status tracking functional after the deposit modal closes or the app reloads. The query parameter is omitted when no order ID exists.

Risk Assessment

  • Risk Level: Low
  • Affected Platforms: Extension, Mobile, Desktop, Web
  • Risk Areas: Perps routed-deposit status tracking

Test plan

  • Verify a routed deposit status request includes the quote orderId.
  • Verify direct Arbitrum USDC and legacy pending orders omit orderId.
  • Run yarn agent:check --profile commit.
  • Run yarn agent:check --profile pr.
  • Run the focused ServiceSwap.utils Jest tests.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant