-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add decimals helper #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for sovryn-layer ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR completely refactors the Decimal class implementation by replacing the custom bigint-based implementation with the decimal.js library. The refactor simplifies the API while maintaining core functionality and adds new utility methods.
Key changes:
- Replaces custom bigint arithmetic with decimal.js library for improved precision and reliability
- Simplifies the internal implementation using decimal.js's D class as the core computation engine
- Adds new utility methods (sqrt, pow, sum) and improves existing static methods (min, max)
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/shared/src/lib/decimal.ts | Complete rewrite using decimal.js library with simplified constructor and enhanced methods |
| packages/shared/src/lib/decimal.spec.ts | Updated tests to match new implementation behavior and added arithmetic operation tests |
| packages/shared/package.json | Added decimal.js dependency |
| packages/sdk/src/lib/sdk.spec.ts | Removed placeholder test file |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
https://sovryn.atlassian.net/browse/SOV-5225