HomePhabricator

[Cashtab][Alias] Status check upon alias registration input pause

Description

[Cashtab][Alias] Status check upon alias registration input pause

Summary:
As per UAT feedback in T3363, this adds an event listener to the aliasName input field so that when the user stops typing for at least 1 second it triggers an API call to check the alias availability. If the alias is unavailable, display error message and disable buttons.

image.png (402×670 px, 29 KB)

This does not include pending registrations because as per spec users should still be able to submit them should they wish to compete for the registration result.

Test Plan:

  • Navigate to the Alias component with no input into the Alias field and observe no keystroke event listener triggered via the dev console
  • Input an already registered alias (e.g. watermelon) and ensure event listener does not trigger the API call whilst typing however it triggers the API call once you've stopped typing for 1 second, which results in a "This alias is already owned by ecash:qz..., please try another alias" UI error message. Ensure buttons are disabled upon this.
  • Input an unregistered alias and ensure the buttons are enabled, with no errors displayed.
  • Simulate an alias-server outage by malforming the 'alias' endpoint, and observe the "Error retrieving alias details" UI error when you pause an alias input for 1 second and disabling of buttons.

Reviewers: bytesofman, #bitcoin_abc, Fabien

Reviewed By: bytesofman, #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
emackAuthored on Dec 1 2023, 07:07
emackPushed on Dec 5 2023, 21:42
Reviewer
Restricted Project
Differential Revision
D14885: [Cashtab][Alias] Status check upon alias registration input pause
Parents
rABC0edc55792cb9: Add mockable clock type and TicksSinceEpoch helper
Branches
Unknown
Tags
Unknown