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 RPC for validating address #3842

Conversation

danield9tqh
Copy link
Member

Summary

Adding endpoint for validating a public address

Testing Plan

Documentation

Does this change require any updates to the Iron Fish Docs (ex. the RPC API
Reference
)? If yes, link a
related documentation pull request for the website.

[ ] Yes

Breaking Change

Is this a breaking change? If yes, add notes below on why this is breaking and
what additional work is required, if any.

[ ] Yes

@danield9tqh danield9tqh requested a review from a team as a code owner April 25, 2023 04:01
@holahula
Copy link
Contributor

are you going to add rpc client support?

IsValidPublicAddressRequestSchema,
(request): void => {
request.end({
valid: isValidPublicAddress(request.data.address),
Copy link
Contributor

@ygao76 ygao76 Apr 25, 2023

Choose a reason for hiding this comment

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

I think its better to use this isValidPublicAddress

export function isValidPublicAddress(publicAddress: string): boolean {
under the hood its the same thing but in case in the future we add logic to the address validation in ts layer

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, it won't practically make a difference, but I think this is a good idea. We should have a cleanup task for standardizing all uses of the function to go through the SDK, and this function is exported through the SDK + used in the wallet

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea sounds good I updated it

@hughy hughy merged commit d824866 into iron-fish:staging Apr 25, 2023
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.

5 participants