HomePhabricator

[Cashtab] Improve Send screen handling of address input

Description

[Cashtab] Improve Send screen handling of address input

Summary: Improve logic of handleAddressChange function on Send screen

Test Plan:
npm test

Edit config/alias.js to set aliasEnabled to true
Navigate to the send screen and test validation for following strings

ecash:qp89xgjhcqdnzzemts0aj378nfe2mhu9yvxj9nhgg6 (valid address), no error msg
ecash:qp89xgjhcqdnzzemts0aj378nfe2mhu9yvxj9nhgg (invalid address and invalid alias), error msg 'invalid alias'
ecash:qp89xgjhcqdnzzemts0aj378nfe2mhu9yvxj9nhgg6?amount=100 (valid address with param), no error msg
chicken.xec (valid alias), alias address displayed under input field
chicken.xe (invalid alias input), error msg 'invalid address'
chicken.xec?amount=100 (valid address with param)
chicken999999999999.xec (valid but unregistered alias), error msg 'alias not registered'

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Jan 9 2024, 20:30
bytesofmanPushed on Jan 10 2024, 17:48
Reviewer
Restricted Project
Differential Revision
D15116: [Cashtab] Improve Send screen handling of address input
Parents
rABC7c09a4215bc5: [Cashtab] Implement CSP header
Branches
Unknown
Tags
Unknown