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

Add address validator static method without throwing errors #368

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

juliancwirko
Copy link
Contributor

Having it as a static method on Address would be super helpful. In many cases, it is good to have a validation without the need to try-catch; at least, I found it helpful. But please remove it if it isn't suitable here or if it should be coded differently. The main goal is to have validation for the address (string) without the need for try-catch.

Copy link
Contributor

@andreibancioiu andreibancioiu left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution 🙏

In the future, this will change a bit, since we'll support addresses with other HRPs, as well.

A general-purpose address validation facility would be added somewhere here - perhaps within the AddressComputer:

https://github.com/multiversx/mx-sdk-specs/blob/main/sdk-core/address.md

Additional notes:

@andreibancioiu andreibancioiu merged commit 435675b into multiversx:main Jan 8, 2024
1 check passed
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.

3 participants