Skip to content

Chore: Adding global deso limit as a param in authorizeDerivedKeyAMM - #53

Merged
stas-kh merged 2 commits into
mainfrom
chore/global-deso-limit-in-authorize-derived-key
Mar 20, 2026
Merged

stas-kh merged 2 commits into
mainfrom
chore/global-deso-limit-in-authorize-derived-key

Conversation

@stas-kh

@stas-kh stas-kh commented Mar 20, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds configurability to derived-key authorization for AMM/TWAP flows by allowing callers to override the derived key’s global DESO spending limit (in nanos), instead of relying solely on hardcoded defaults.

Changes:

  • Added optional GlobalDESOLimitNanos payload field to override identity.derive’s GlobalDESOLimit.
  • Renamed numSubOrders to NumSubOrders and updated derived key limit calculations to use the new name.
  • Updated derived key spending-limit construction logic to prefer the override when provided.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/transactions/amm.ts Outdated
Comment thread src/transactions/amm.ts
@stas-kh
stas-kh merged commit 915509b into main Mar 20, 2026
1 check passed
@stas-kh
stas-kh deleted the chore/global-deso-limit-in-authorize-derived-key branch March 20, 2026 13:56
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.

3 participants