HomePhabricator

[alias-server] Improve code organization, generate mocks from script

Description

[alias-server] Improve code organization, generate mocks from script

Summary:
T2960

Was going to patch some other bugs but needed to organize the code first and clean up index.js. Move util functions out of index.js and into new script in new scripts folder. Call with new npm script.

Test Plan:
npm run mocks and observe mocks generated in test/mocks/generated folder
clear database and node index.js, add a new alias using cashtab, confirm it's added to the db

Reviewers: #bitcoin_abc, emack

Reviewed By: #bitcoin_abc, emack

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

Details

Provenance
bytesofmanAuthored on Mar 6 2023, 22:25
bytesofmanPushed on Mar 8 2023, 17:46
Reviewer
Restricted Project
Differential Revision
D13246: [alias-server] Improve code organization, generate mocks from script
Parents
rABC24565c8ca6d5: [Cashtab] [Alias] pt 17 - Enforce lowercase inputs
Branches
Unknown
Tags
Unknown