[Cashtab] Support alias registration of user input addresses
Summary:
T3060
Support user input of address for alias registration
The Alias.js screen loads with a checkbox selected indicating that the alias will be registered to the active wallet's address.
The user may uncheck this box and enter an address of their choosing, P2SH or P2PKH. User input is validated.
Note: alias-server has not yet been updated to parse these txs.
Test Plan:
npm test
In components/common/Ticker.js, change the aliasSettings.aliasEnabled bool to true
npm start
Navigate to the Alias.js screen. Confirm checkbox is checked.
Register an alias without unchecking the box.
Uncheck the box.
Confirm alias address input form appears.
Enter an invalid address and confirm validation error.
Enter a valid address and confirm validation error disappears, 'Register Alias' button is enabled (if alias input is valid)
Register this alias
Try registering to a p2sh address, like the IFP address ecash:prfhcnyqnl5cgrnmlfmms675w93ld7mvvqd0y8lz07
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D13867