Skip to content

🐛 fix: Reject negative values in Gwei and Ether modules#280

Closed
roninjin10 wants to merge 1 commit intomainfrom
fix/issue-80-denomination-negative
Closed

🐛 fix: Reject negative values in Gwei and Ether modules#280
roninjin10 wants to merge 1 commit intomainfrom
fix/issue-80-denomination-negative

Conversation

@roninjin10
Copy link
Contributor

Summary

Test plan

  • Negative bigint rejected
  • Negative number rejected
  • Negative string rejected
  • All 175 denomination tests pass

🤖 Generated with Claude Code

Gwei.from() and Ether.from() accepted negative values (bigint, number, string)
while Wei.from() properly rejected them via Uint.from() validation. Added
consistent validation to Gwei/Ether and tests for all three modules.

Fixes #80

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Jan 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
dist Error Error Jan 4, 2026 11:52am
voltaire Error Error Jan 4, 2026 11:52am

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.

Bug: Denomination/Ether/Wei modules accept negative values

1 participant