Skip to content

Conversation

@gndelia
Copy link
Contributor

@gndelia gndelia commented Sep 15, 2025

While developing on Hemi, I came across this incorrect error message:

minDecimals should be smaller than maxDecimals, but the error message states otherwise. This PR fixes the error message + the test

Copy link

Copilot AI left a 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 fixes an incorrect validation error message in the smart-round library. The error message previously stated that "minDecimals should be larger than maxDecimals" when the validation actually checks if minDecimals is greater than maxDecimals, which should be an invalid condition.

  • Updates the error message to correctly state "minDecimals should not be larger than maxDecimals"
  • Updates the corresponding test description and expected error message to match the corrected validation
  • Bumps the package version from 3.0.0 to 3.0.1

Reviewed Changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/index.ts Corrects the validation error message for the minDecimals/maxDecimals comparison
test/src.index.spec.ts Updates test description and expected error message to match the corrected validation
package.json Bumps version to 3.0.1 for the bug fix release

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@gndelia gndelia enabled auto-merge (squash) September 15, 2025 19:44
@gndelia gndelia merged commit a51315d into master Sep 15, 2025
8 checks passed
@gndelia gndelia deleted the fix-wrong-error-message branch September 15, 2025 20:38
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.

4 participants