HomePhabricator

[Cashtab][Ailas] Remove aliasToRegister and aliasLength state vars

Description

[Cashtab][Ailas] Remove aliasToRegister and aliasLength state vars

Summary:
The aliasToRegister state var can be accessed directly via formData.aliasName, hence removal.

As a direct impact, aliasLength is also redundant and can be accessed via formData.aliasName.length.

Test Plan:
npm test
set alias config flag to true
npm start
type in an alias for registration and observe correct parsing of length
type in an alias with invalid length and observe input error
shorten the previous invalid lengthed alias into a valid length and observe the input error disappears
submit the alias for registration and observe correct parsing of name and price in confirmation dialog and subsequent name display in the tx history tab after broadcast
submit an already registered alias and ensure preparePreviewModal picks this up with an error
(don't worry about the non-rendering of pending and registered aliases as these are being implemented in D14611

Reviewers: bytesofman, #bitcoin_abc, Fabien

Reviewed By: bytesofman, #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
emackAuthored on Oct 11 2023, 00:01
emackPushed on Oct 16 2023, 10:39
Reviewer
Restricted Project
Differential Revision
D14624: [Cashtab][Ailas] Remove aliasToRegister and aliasLength state vars
Parents
rABC2df11e1fd2f6: sync: Use decltype(auto) return type for WITH_LOCK
Branches
Unknown
Tags
Unknown