[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