Skip to content

Conversation

@mcmire
Copy link
Contributor

@mcmire mcmire commented Jun 21, 2024

Some functions that return hex strings satisfying the Hex type return a string type instead. This makes it slightly inconvenient to use these functions in conjunction with others, and it is common in practice to use a type assertion as a workaround. This commit rectifies this issue by assigning these functions proper return types:

  • getChecksumAddress
  • numberToHex
  • bigIntToHex

As such this change is breaking.

Fixes #159.

Some functions that return hex strings satisfying the `Hex` type return
a `string` type instead. This makes it slightly inconvenient to use
these functions in conjunction with others, and it is common in practice
to use a type assertion as a workaround. This commit rectifies this
issue by assigning these functions proper return types:

- `getChecksumAddress`
- `numberToHex`
- `bigIntToHex`

As such this change is **breaking**.
@mcmire mcmire requested a review from a team as a code owner June 21, 2024 19:43
@mcmire mcmire requested a review from a team June 21, 2024 19:46
Copy link
Contributor

@MajorLift MajorLift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link

@kanthesha kanthesha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

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.

Some functions do not return a Hex when they should

3 participants