refactor(validate_address): expose logic for consumers - #9658
Conversation
|
I'm not sure we want |
I agree that at least some of it should probably go in I think it'd fine to add the function here for now and move it later (it would be nice to avoid duplicating the code), but since most of the logic is already in the |
|
@gustavovalverde any idea why CI on this PR seems stuck? |
All contributor PRs are getting stuck, I don't know the reason, but we've been admin-merging those. Let me know if you'd like for me to merge this. |
Yes please, it can't hurt to have it factored out, even if it ends up not being used in Zaino. |
Motivation
Zaino needs to expose a
validateaddressJSON-RPC endpoint, which Zebra already implements.Solution
Moving
validate_address's body into a public function should allow consumers to re-use the address validation logic.PR Checklist