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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

lint

apps/alias-server/test/dbTests.js
372 ↗(On Diff #42281)

this is tested in app.test.js

386 ↗(On Diff #42281)

this is tested in app.test.js

This revision is now accepted and ready to land.Sep 20 2023, 09:30