Skip to content

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

Open
naddison36 wants to merge 1 commit into
mainfrom
nicka/pricing-actions
Open

Fixed parsing of buy and sell amounts in pricing#326
naddison36 wants to merge 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

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