HomePhabricator

[Cashtab][Alias] Refactor Alias.js to use new alias-server endpoints

Description

[Cashtab][Alias] Refactor Alias.js to use new alias-server endpoints

Summary:
T3216

This diff refactors Alias.js to connect to the new alias-server endpoints to check:

  • alias availability
  • aliases registered to the active wallet

These were not pushed as two separate diffs because they are dependent on each other e.g. once an alias is confirmed to be available and is then registered, the reviewer needs the 'aliases registered to address' component to be hooked up to alias-server at the same time to verify the registration on the Alias.js page.

Test Plan:

  • npm test
  • change alias flag in Ticker.js to true
  • npm start
  • navigate to the Alias screen and ensure existing registered aliases for this address are displayed
  • register a new alias that is available and ensure successful broadcast
  • wait for one confirmation and then refresh the page and verify registered alias is now displayed on Alias.js
  • verify registration status matches alias-server's alias endpoint
  • verify newly registered alias is recognized via alias-server's address endpoint
  • attempt to register an alias that is already confirmed and verify registration error

Reviewers: bytesofman, #bitcoin_abc

Reviewed By: bytesofman, #bitcoin_abc

Subscribers: Fabien

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

Details

Provenance
emackAuthored on Jul 5 2023, 01:42
emackPushed on Jul 25 2023, 23:00
Reviewer
Restricted Project
Differential Revision
D14211: [Cashtab][Alias] Refactor Alias.js to use new alias-server endpoints
Parents
rABC329402aee48b: [ecash-herald] Parse token ids for slp2
Branches
Unknown
Tags
Unknown