Skip to content

chore: sync perps controller may 15 2026#8803

Merged
gambinish merged 2 commits into
mainfrom
perps-controller-sync-2026-05-13
May 13, 2026
Merged

chore: sync perps controller may 15 2026#8803
gambinish merged 2 commits into
mainfrom
perps-controller-sync-2026-05-13

Conversation

@gambinish
Copy link
Copy Markdown
Member

@gambinish gambinish commented May 13, 2026

Explanation

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Medium Risk
Touches trading readiness/signing flows and the rewards discount integration (including a DI signature change), which could affect when users are prompted to sign and how fees/discounts are computed. Most changes are additive guards/logging but in a user-critical trading path.

Overview
Improves HyperLiquid unified-account migration behavior by deferring signing-backed setup for hardware wallets across more abstraction modes, and expanding hardware keyring detection (Ledger/Trezor/OneKey/Lattice/QR) to reduce repeated signing prompts while browsing.

Hardens error classification by adding isKeyringLockedError (walks cause chain) and using it to treat SDK-wrapped keyring-lock failures as retryable for unified-account setup, builder-fee approval, and referral setup.

Updates rewards discount resolution to pass the perps builder base fee (in bips) into getPerpsDiscountForAccount, and treats null (unhydrated subscription state) as “unavailable” rather than a definitive no-discount result. Adds additional error logging for failed cancel/close/TP-SL operations (including batch failure summaries).

Reviewed by Cursor Bugbot for commit 84a5bb6. Bugbot is set up for automated code reviews on this repo. Configure here.

@gambinish gambinish requested review from a team as code owners May 13, 2026 21:42
@gambinish gambinish temporarily deployed to default-branch May 13, 2026 21:43 — with GitHub Actions Inactive
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 84a5bb6. Configure here.

Comment thread packages/perps-controller/src/utils/hyperLiquidAbstraction.ts
@gambinish gambinish added this pull request to the merge queue May 13, 2026
Merged via the queue into main with commit 2c934e1 May 13, 2026
370 checks passed
@gambinish gambinish deleted the perps-controller-sync-2026-05-13 branch May 13, 2026 23:06
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.

2 participants