HomePhabricator

[Cashtab] Use vectors for parseAddressForParams unit tests

Description

[Cashtab] Use vectors for parseAddressForParams unit tests

Summary:
To prepare for a broader refactor of the parseAddressForParams function (to support more complex validation requirements of bip21 query strings), update the unit tests to use an array of vectors.

See D15134 for a proof of concept. Want to add more features and test conditions to the function so that more of the validation work is handled in this unit tested function and not by screens.

The function itself and its unit tests are not changed by this diff.

Test Plan:
npm test

grep -r parseAddressForParams src/ and confirm import is updated on all screens where it is used

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
bytesofmanAuthored on Jan 11 2024, 14:43
bytesofmanPushed on Jan 11 2024, 17:13
Reviewer
Restricted Project
Differential Revision
D15137: [Cashtab] Use vectors for parseAddressForParams unit tests
Parents
rABCfc3250119956: [herald] shorter identifier for anon-ish miner
Branches
Unknown
Tags
Unknown