HomePhabricator

[Cashtab] [Alias] pt 19 - Pre-prod update - Update getLatestAliases to use the…

Description

[Cashtab] [Alias] pt 19 - Pre-prod update - Update getLatestAliases to use the State endpoint

Summary:
T2551

As part of performance optimization, this diff refactors getLatestAliases to use the new getAliasServerState (state endpoint) in aliasUtils.js to check whether local cached alias counts match the onchain alias counts. If they don't match, only then will Cashtab make a call to getAliasServerHistory (aliases endpoint) to retrieve the latest list of aliases.

[Cashtab] [Alias] pt 18 - Pre-prod update - Remove residual dev logs
[Cashtab] [Alias] pt 19 - Pre-prod update - Update getLatestAliases to use the State endpoint
[Cashtab] [Alias] pt 20 - Pre-prod update - Set final registration fees
[Cashtab] [Alias] pt 21 - Pre-prod update - Set final payment address and enable prod flag

Test Plan:

  • enable aliases in ticker.js
  • npm test
  • npm start
  • assuming wallet cache is recent, the console log should display Server and cache both have 426 aliases. Cashtab alias cache is up to date. and note the alias count
  • register a new alias
  • upon new block, ensure the cache alias count does not match onchain alias count, refreshing aliasCache log is displayed in console
  • refresh the app and note the correctly incremented alias count matching for cache and onchain.

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

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

Details

Provenance
emackAuthored on Mar 29 2023, 10:44
emackPushed on Mar 29 2023, 23:33
Reviewer
Restricted Project
Differential Revision
D13495: [Cashtab] [Alias] pt 19 - Pre-prod update - Update getLatestAliases to use the State endpoint
Parents
rABC6df34d4b1448: [Chronik] Move `mempool` module to `chronik-db`
Branches
Unknown
Tags
Unknown