HomePhabricator

[Cashtab] [Alias] pt 6.1 - Get latest alias tx count from payment address

Description

[Cashtab] [Alias] pt 6.1 - Get latest alias tx count from payment address

Summary:
T2551

Depends on D13015

As per tg discussion this diff is now repurposed to retrieve the latest total tx count for the Alias payment address as part of a multi diff caching implementation.

I leveraged the total tx count logic from https://reviews.bitcoinabc.org/D13010 and I also validated an invalid hash160 will cause Promise.All to fail as intended.

[Cashtab] [Alias] pt 1 - Create scaffold for new Identity component
[Cashtab] [Alias] pt 2 - Upgrade sendXec() to handle alias registration
[Cashtab] [Alias] pt 3 - Implement isAliasAvailable function
[Cashtab] [Alias] pt 4 - Implement isAddressRegistered function
[Cashtab] [Alias] pt 5 - Implement getAddressFromAlias function
[Cashtab] [Alias] pt 6.1 - Get latest alias tx count from payment address
[Cashtab] [Alias] pt 6.2 - Implement getAliasesFromLocalForage
[Cashtab] [Alias] pt 6.3 - Implement updateAliases
[Cashtab] [Alias] pt 6.4 - Implement setAlisesToLocalForage
[Cashtab] [Alias] pt 6.5 - Deprecate caching related mocks and @TODOs
[Cashtab] [Alias] pt 7 - Enable alias lookup for Send XEC component
[Cashtab] [Alias] pt 8 - Enable alias lookup for Send Token component
[Cashtab] [Alias] pt 9 - Implement pricing mechanism
[Cashtab] [Alias] pt 10 - Server cron job
[Cashtab] [Alias] pt 11 - Upgrade tx history to recognize alias registration txs

Test Plan:

  • npm test
  • npm start
  • navigate to the Alias page and verify console logs display the latest total tx count for the payment address and ensure it matches what's shown on explorer.e.cash
  • register a new alias, navigate to another page, then back to Alias and ensure the count in console log is incremented by 1.

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

Differential Revision: https://reviews.bitcoinabc.org/D13018

Details

Provenance
emackAuthored on Jan 21 2023, 13:04
emackPushed on Feb 22 2023, 04:05
Reviewer
Restricted Project
Differential Revision
D13018: [Cashtab] [Alias] pt 6.1 - Get latest alias tx count from payment address
Parents
rABC7d900b22ccdc: [Cashtab] [Alias] pt 5 - Implement getAddressFromAlias function
Branches
Unknown
Tags
Unknown