Skip to content
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

Remove uneccessary static methods #519

Merged
merged 10 commits into from
Nov 8, 2022
Merged

Remove uneccessary static methods #519

merged 10 commits into from
Nov 8, 2022

Conversation

Trivo25
Copy link
Member

@Trivo25 Trivo25 commented Oct 31, 2022

Removes .fromString(), .fromNumber() and .fromBigInt() on Field, UInt64, UInt32 and Int64

closes #486

@Trivo25 Trivo25 marked this pull request as ready for review November 7, 2022 10:50
Copy link
Member

@mitschabaude mitschabaude left a comment

Choose a reason for hiding this comment

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

LGTM!

expect(x.value).toEqual(new UInt32(Field(1)).value);
it('should be the same as Field.one', () => {
const x = UInt32.from(1);
expect(x.value).toEqual(new UInt32(Field.one).value);
Copy link
Member

Choose a reason for hiding this comment

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

isn't this change and similar ones going against our deprecation of Field.one? 😅

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh ye thats right, I accidentally kept the old changes from the merge conflict

@Trivo25 Trivo25 merged commit 11d6fa8 into main Nov 8, 2022
@Trivo25 Trivo25 deleted the static-cleanup branch November 8, 2022 13:15
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.

Remove Field.fromNumber(x) to reduce API surface area
2 participants