Repository navigation
Conversation
Negative cent amounts from -1 to -9 were incorrectly formatted to be 0.1 and 0.9. The issue was the negative sign '-' which caused the padding to be off by one. A test including a negative number was also added. This completes the fix in oss-apps#591.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Format bigint currency amounts src/utils/numbers.ts, src/tests/number.test.ts |
parseToCleanString uses the absolute bigint value for its integer and fractional components. The test covers positive and negative single-digit cents, both expecting '$0.07'. |
Priority:
Estimated code review effort: 1 (Trivial) | ~5 minutes
Change: Bug fix
Suggested reviewers: friesischscott
Merge Risk: 
Minimal · up to 8ee4b
-
The negative single-digit cent formatting issue is corrected without an identified merge-blocking risk.
Pre-merge checks: 
5
-
Full details: Docstring Coverage
-
Explanation
No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Description
Negative cent amounts from -1 to -9 were incorrectly formatted to be 0.1 and 0.9 respectively. The issue was the negative sign '-' which caused the padding to be off by one.
A test including a negative number was also added.
This completes the fix in #591.
Checklist
CONTRIBUTING.mdin its entiretySummary by CodeRabbit
-7ndisplays as$0.07.