Page MenuHomePhabricator

[Cashtab] [Alias] pt 6.6 - Render list of Aliases owned by active wallet in Alias.js
ClosedPublic

Authored by emack on Feb 10 2023, 14:28.

Details

Summary

T2551

Depends on D13085

This diff updates the Alias.js page to collate cached aliases which matches the active wallet's address. These are then rendered in a textarea upon page load and registration of a new alias.

[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.1.1 - Apply Promise.All approach for alias history retrieval
[Cashtab] [Alias] pt 6.2 - Implement getAliasesFromLocalForage
[Cashtab] [Alias] pt 6.3 - Implement updateAliases
[Cashtab] [Alias] pt 6.4 - Update getAliases() to extract both alias and address
[Cashtab] [Alias] pt 6.5 - Optimize getAllTxHistory to only make API calls for uncached tx history pages
[Cashtab] [Alias] pt 6.6 - Render list of Aliases owned by active wallet in Alias.js
[Cashtab] [Alias] pt 7 - Mitigate edge cases for registration records (same rego in same block, validate emoji char counts)
[Cashtab] [Alias] pt 8 - Enable alias lookup for Send XEC component
[Cashtab] [Alias] pt 9 - Enable alias lookup for Send Token component
[Cashtab] [Alias] pt 10 - Upgrade tx history to recognize alias registration txs
[Cashtab] [Alias] pt 11 - Set final registration fees and remove residual dev logs

Test Plan
  • npm test
  • npm start
  • create and fund a new wallet
  • navigate to the alias page and verify the console log showing Does this active wallet have an onchain alias? : false and the alias textarea shows N/A
  • register a new alias and ensure upon successful broadcasting it is displayed in the alias textarea with (Pending) after it. We'll figure out the websocket listener in part 7 - Mitigate edge cases for registration records
  • register a second alias and ensure it is appended to the existing list in the text area

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

emack requested review of this revision.Feb 10 2023, 14:28

image.png (394×441 px, 20 KB)

  • Aliases should be registered as a list, one per line
  • The list should appear below the UI for registering aliases, so that this is always visible on loading the alias screen
  • Your own aliases should also be cached (can do this after we are in prod, optimization)
This revision now requires changes to proceed.Feb 10 2023, 14:52

image.png (394×441 px, 20 KB)

  • Aliases should be registered as a list, one per line
  • The list should appear below the UI for registering aliases, so that this is always visible on loading the alias screen
  • Your own aliases should also be cached (can do this after we are in prod, optimization)

i.e. displayed as a list, not in a multi-line text box

  • own aliases changed to render one per line and moved beneath the registration UI
  • created T2938 to add own aliases to the caching mechanism
This revision is now accepted and ready to land.Feb 13 2023, 18:18