Page MenuHomePhabricator

[Cashtab] [final countdown bch param p4] Convert useBCH.js from hook to util
AbandonedPublic

Authored by bytesofman on Dec 8 2022, 15:50.

Details

Reviewers
emack
Group Reviewers
Restricted Project
Summary

T2730

Depends on D12808

Since useBCH.js no longer needs to be a hook, remove this complication.

This is a large diff because stacking these changes would require repeating numerous import path changes. What is going on here is not too complicated.

  1. Convert useBCH.js from a hook to a file that exports functions (this one change requires all imports to change throughout the app)
  2. Change name of useBCH.js to transactions.js (another change that would require changing all imports throughout Cashtab)
  3. Move transactions.js to utils/ (another change that would require changing all the imports)
  4. Move associated mocks, update unit tests to reference their new location
Test Plan

Review name changes and unit test changes to confirm only the way functions are imported and the location of mocks is changed
npm test
npm start
Test all the functions from the former useBCH.js:
send an XEC tx
send an eToken tx
create a token
burn etoken

Diff Detail