Skip to content

Fixed parsing of buy and sell amounts in pricing - #326

Merged
naddison36 merged 1 commit into
mainfrom
nicka/pricing-actions
Aug 10, 2026
Merged

Fixed parsing of buy and sell amounts in pricing#326
naddison36 merged 1 commit into
mainfrom
nicka/pricing-actions

Conversation

@naddison36

@naddison36 naddison36 commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Treat --buy-amount and --sell-amount as token-denominated values across the WETH, Ethena, and USDC pricing actions
  • Scale buy amounts using the liquidity asset’s decimals and sell amounts using the base asset’s decimals
  • Support fractional amounts, such as 1.5
  • Update action parameter types and documentation
  • Add regression coverage for 18-decimal and 6-decimal assets

Testing

  • Added tests covering:
    • 1 token with 18 decimals
    • 1 token with 6 decimals
    • 1.5 tokens with 6 decimals
  • Prettier and git diff --check pass

@naddison36
naddison36 merged commit aecfedc into main Aug 10, 2026
7 checks passed
@naddison36
naddison36 deleted the nicka/pricing-actions branch August 10, 2026 07:00
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