Page MenuHomePhabricator

[Cashtab][Alias] Implement getAliasesForAddress
ClosedPublic

Authored by emack on Jul 2 2023, 00:28.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Commits
rABC6720c88e2e55: [Cashtab][Alias] Implement getAliasesForAddress
Summary

T3216

Add the new getAliasesForAddress function in aliasUtils.js to wrap around the fetch call to alias-server's address endpoint.

Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
getAliases
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24317
Build 48244: Build Diffcashtab-tests
Build 48243: arc lint + arc unit

Event Timeline

emack requested review of this revision.Jul 2 2023, 00:28
emack planned changes to this revision.Jul 2 2023, 00:31

globalized the fetch() mock override, fixed linting and unit test issues

bytesofman requested changes to this revision.Jul 2 2023, 03:20
bytesofman added inline comments.
cashtab/src/utils/__mocks__/mockAliasServerResposnes.js
1 ↗(On Diff #41170)
cashtab/src/utils/__tests__/aliasUtils.test.js
7 ↗(On Diff #41170)
47 ↗(On Diff #41170)

should be getting an error here

This revision now requires changes to proceed.Jul 2 2023, 03:20
emack marked 2 inline comments as done.

fixed typos

emack planned changes to this revision.Jul 2 2023, 09:17
emack added inline comments.
cashtab/src/utils/__tests__/aliasUtils.test.js
48 ↗(On Diff #41185)

Will update response handling once D14193 is propagated to alias.etokens.cash.

updated getAliasesforAddress to throw error if address endpoint returns an error response
updated error handling unit test accordingly

This revision is now accepted and ready to land.Jul 3 2023, 03:51