Page MenuHomePhabricator

[alias-server] remove redundant address validation from db function
ClosedPublic

Authored by bytesofman on Sep 19 2023, 19:20.

Details

Summary

When getAliasInfoFromAddress was written, it was the only function used to query at the /address/ endpoint. So, it made sense to handle the address validation there. Now that this endpoint makes two separate database queries, the address validation should be handled before each query -- and it is, in the endpoint handling function defined in app.js

Remove address validation from getAliasInfoFromAddress as this function is only used by the /address/ endpoint handler defined in app.js and this handler already performs address validation.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
remove-double-validation
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25087
Build 49762: Build Diffalias-server-tests
Build 49761: arc lint + arc unit